Saturday, June 2, 2018

The Art of Java-Based HTTP Data Service Implementation and Testing (Part 2)

In the previous article of this HTTP data service implementation and testing series, we walked through the process of creating a simple data service in Java with a built-in fully automated testing facility. In today's post, we will flesh out the project with RESTful service endpoints for a simple TODO task management system. We will also demonstrate how to create automated testing cases for all service endpoints. Here are the service endpoints we will code in today's journey:

  • GET /todos
    Get all TODO items
  • GET /todos/?q=?
    Query TODO items with the description of the value passed in by "q"
  • GET /todos/{id}
    Return the TODO item specified by ID
  • POST /todos
    Add one TODO item
  • DELETE /todos/{id}
    Remove the TODO item specified by ID

So let's start by creating our project. Typing the following command in your console to generate the project:



from DZone.com Feed https://ift.tt/2J6tZFS

No comments:

Post a Comment