This API was created to calculate information provided on the last minute.
It currently holds only one endpoint that will return an array with the following:
sum avg max min count
You can check it through swagger running it at localhost:8081 (8081 by default)
You need to have java 1.8 to run this project To compile the project you need maven 3.2+ All repositories used here are public and should not have any restriction.
Java 1.8 Maven 3.2+
You can compile it using mvn clean install or mvn clean install -DskipTests (to avoid running the tests)
After that you can execute: java -jar $PROJECT_PATH/target/demo-VERSION.jar
The tests will run when compiling the project. You can isolate run the tests as well if you prefer. Integration tests and unit tests are present
It currently have 2 unit tests and one integration test
StatsControllerTest and StatisticCalculatorServiceTest are unit test, both test and assert the results of both controller and service
TransacFeignClientIT: Stubs the response from the transaction service API that will provide me information, running through the real context of the application.
You can run the jar directly or deploy it on an application server.
If you prefer you can override the following parameters:
server.port -- value default:8081 -- It is the port where the API will be running transactions.api.url -- value default:http://localhost:8080/ -- It is the url where the transaction API will be running
Juan Hernandez
This project is licensed under the MIT License - see the LICENSE.md file for details