The project purpose is to show the discrepancy between updating the collection of the associated resources using PATCH
and PUT
HTTP methods
The tests are aggregated in com.kmochocki.datarestexample.ResourceUpdateTest
class
shouldCreateMainResourceWithSingleChildResource()
andshouldCreateMainResourceWithTwoChildResources()
are to ensure that the request body is correct andPOST
is working with itshouldAddChildResourceUsingPatchMethod()
andshouldAddChildResourceUsingPutMethod()
are usingperformAddingChildUsing(HttpMethod httpMethod)
in order to reflect that the only difference is the HTTP method- analogically,
shouldRemoveChildResourceUsingPatchMethod()
andshouldRemoveChildResourceUsingPutMethod()
usingperformRemovingChildUsing(HttpMethod httpMethod)
in the main dir run
$ ./gradlew build -i
-i
allows application logs to be seen in the console (HTTP requests are logged)