Package com.shri.restinpeace.mock
package com.shri.restinpeace.mock
-
ClassesClassDescriptionA canned response for
MockRestServerto send back for a matching request.A real, local HTTP server for unit-testing code that calls a@RestClientinterface, without depending on a real network - pointRIP.getClient(Class, String)atMockRestServer.baseUrl()and this server stands in for the real one.A JUnit 5 extension that starts oneMockRestServerfor a whole test class andresetsit before each test - register it with@ExtendWithand receive the server as a test (or@BeforeEach) method parameter, instead of wiring up@BeforeAll/@AfterAll/@BeforeEachboilerplate by hand.A single requestMockRestServeractually received, for a test to assert against after making a call through a@RestClientinterface.One part of a decodedmultipart/form-datarequest body, as returned byRecordedRequest.getParts().