Skip to content

Commit

Permalink
further update
Browse files Browse the repository at this point in the history
  • Loading branch information
AmarkumarJagtap committed Jun 13, 2019
1 parent 99820a9 commit 9314606
Show file tree
Hide file tree
Showing 20 changed files with 809 additions and 545 deletions.
13 changes: 13 additions & 0 deletions .idea/libraries/Maven__commons_codec_commons_codec_1_10.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__io_rest_assured_json_path_3_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__io_rest_assured_rest_assured_3_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__io_rest_assured_xml_path_3_0_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_ccil_cowan_tagsoup_tagsoup_1_2_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_codehaus_groovy_groovy_2_4_7.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_codehaus_groovy_groovy_json_2_4_7.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_codehaus_groovy_groovy_xml_2_4_7.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions SuperSimpleStockExchange.iml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,18 @@
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.0.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.0-M1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: io.rest-assured:rest-assured:3.0.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.codehaus.groovy:groovy:2.4.7" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.codehaus.groovy:groovy-xml:2.4.7" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.httpcomponents:httpclient:4.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.httpcomponents:httpcore:4.4.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: commons-codec:commons-codec:1.10" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.httpcomponents:httpmime:4.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.ccil.cowan.tagsoup:tagsoup:1.2.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: io.rest-assured:json-path:3.0.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.codehaus.groovy:groovy-json:2.4.7" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: io.rest-assured:rest-assured-common:3.0.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: io.rest-assured:xml-path:3.0.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
</component>
</module>
141 changes: 74 additions & 67 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,68 +1,75 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.app.stockmarket</groupId>
<artifactId>SuperSimpleStockExchange</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>

<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.0-M1</version>
<scope>test</scope>
</dependency>
</dependencies>

<properties>
<java.version>1.8</java.version>
<start-class>com.app.stockmarket.Application</start-class>
</properties>


<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.app.stockmarket</groupId>
<artifactId>SuperSimpleStockExchange</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>

<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.0-M1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jayway.restassured/rest-assured -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>3.0.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<properties>
<java.version>1.8</java.version>
<start-class>com.app.stockmarket.Application</start-class>
</properties>


<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
7 changes: 3 additions & 4 deletions src/main/java/com/app/stockmarket/StockMarketController.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@ public ResponseEntity<String> buy(@Valid String stockSymbol, @Valid int quantit
/**
*
* @param stockSymbol
* @param minutes
* @return
* @throws InvalidStockException
*/
@GetMapping("/volWeightedStockPrice/{stockSymbol}/{minutes}")
public ResponseEntity<Double> calculateVolumeWeightedStockPrice(@PathVariable String stockSymbol, @PathVariable int minutes) throws InvalidStockException
@GetMapping("/volWeightedStockPrice/{stockSymbol}")
public ResponseEntity<Double> calculateVolumeWeightedStockPrice(@PathVariable String stockSymbol) throws InvalidStockException
{
return new ResponseEntity<> (stockExchange.calculateVolumeWeightedStockPrice(stockSymbol, minutes), HttpStatus.OK);
return new ResponseEntity<> (stockExchange.calculateVolumeWeightedStockPrice(stockSymbol), HttpStatus.OK);
}


Expand Down
Loading

0 comments on commit 9314606

Please sign in to comment.