This application is a simple RESTful webservice that implements a common e-commerce scenario, placing and modifying orders.
mvn clean install
mvn jetty:run
mvn clean test
I suggest you to use postman, a chrome extension
To add a produc: [GET] http://localhost:8080/store/product/populate/chinelo [GET] http://localhost:8080/store/product/populate/patins [GET] http://localhost:8080/store/product/populate/skate
(I know I should change it to POST)
List products: [GET] http://localhost:8080/store/product/list
Search products: [GET] http://localhost:8080/store/product/10 (10 is the product ID)
Place Order: [POST] http://localhost:8080/store/order/place/ Body: raw Accept:application/json Content-Type:application/json [{"id":10,"name":"chinelo"}]
List Orders: [GET] http://localhost:8080/store/order/list
Product details: [GET] http://localhost:8080/store/details/20 (20 is the product details)
Change order: [POST] http://localhost:8080/store/order/change/20 Body: raw Accept:application/json Content-Type:application/json [{"id":11,"name":"bolsa"}] em que 20 é o ID da compra
Integration tests is on the backlog.