Skip to content

prateek0227/transformersAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps to test the application

**Prerequists:- java and maven should be installed previously.

  1. git clone https://github.com/prateek0227/transformersAPI.git
  2. mvn spring-boot:run - this will start the application at localhost:8080
  3. go to http://localhost:8080/swagger-ui.html#!/transformer-controller to test the apis from the browser

Main application file - ApiApplication.java

Following APIs are present

  1. GET /transformers - get a list of all the saved transformers. Initially there are 5 pre loaded transformers.
  2. POST /transformers - save a transformer by passing in the required fields as json object
  3. GET /transformers/{id} - get details of a transformer by id
  4. PUT /transformers/{id} - update a transformer by id. If id does not exist, a new transformer will be created by using the details of the passed in transformer object but with an autogenerated id.
  5. DELETE /transformers/{id} - delete a transformer by id
  6. POST /getBattleResult - get the result of the battle by passing in valid transformer ids as a list.

To run unit and integration tests run the following command - mvn clean test

Unit Test file - ServiceUnitTests.java Integration Test file - ApiTest.java

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages