Challenge - Shopping list application
- Spring Boot - Development tool for Java language.
- Swagger - Essential in an interface description language to describe RESTful APIs expressed using JSON.
- Maven - Build automation tool used primarily in Java projects.
- Clone the project- git@github.com:paluan-batista/Stone-Challenge.git
- Access the project root through a terminal, and download the dependencies with the following command:
$mvn clean package
.
- Calculate the sum of the values, that is, multiply the price of each item by its quantity and add up all the items.
- Divide the amount evenly between the number of emails.
- Return a map / dictionary where the key will be the email and the amount will be how much he must pay on that account.
Well, there are two ways to test this app. I will exemplify.
-
First way: start the application and test via Insomnia or Postman.
- Import the application into a development environment (IDE) of your choice (SpringTool Suite, Intelliji).
- To get started, access the package
com.stone.challenge
and openStoneChallengeApplication.java
class. - Execute main method : run as -> Spring Boot App
- Now, access this Insomnia or Postman for test.
-
Testing find all return
- Testing find by ID return
- Testing find by name (email) return
- Testing get balance payable per person return
-
Second way: Testing application with heroku server.
- This application was deployed to the Heroku server.
- Note: The first request may take a while as Heroku needs to upload the application.
- To test, just use the same endpoints used in Insomnia / Postman.