-
- All Implemented Interfaces:
public final class JSONMockServerJSONMockServeris a wrapper class for Spring's MockRestServiceServer, providing access to the JSONConfig instance discovered through Spring auto-wiring.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classJSONMockServer.JSONResponseActions
-
Constructor Summary
Constructors Constructor Description JSONMockServer(MockRestServiceServer mrss, JSONConfig config)
-
Method Summary
Modifier and Type Method Description final MockRestServiceServergetMrss()final JSONConfiggetConfig()final JSONMockServer.JSONResponseActionsexpect(RequestMatcher requestMatcher)final JSONMockServer.JSONResponseActionsexpect(ExpectedCount expectedCount, RequestMatcher requestMatcher)final Unitverify()final Unitverify(Duration timeout)final Unitreset()final JSONMockServer.JSONResponseActionsmock(ExpectedCount expectedCount, HttpMethod method, URI uri, Function1<JSONMockServerDSL, Unit> block)final JSONMockServer.JSONResponseActionsmockGet(ExpectedCount expectedCount, URI uri, Function1<JSONMockServerDSL, Unit> block)Establish a mock request with the method preset to GET. final JSONMockServer.JSONResponseActionsmockPost(ExpectedCount expectedCount, URI uri, Function1<JSONMockServerDSL, Unit> block)Establish a mock request with the method preset to POST. final JSONMockServer.JSONResponseActionsmockPut(ExpectedCount expectedCount, URI uri, Function1<JSONMockServerDSL, Unit> block)Establish a mock request with the method preset to PUT. final JSONMockServer.JSONResponseActionsmockDelete(ExpectedCount expectedCount, URI uri, Function1<JSONMockServerDSL, Unit> block)Establish a mock request with the method preset to DELETE. -
-
Method Detail
-
getMrss
final MockRestServiceServer getMrss()
-
getConfig
final JSONConfig getConfig()
-
expect
final JSONMockServer.JSONResponseActions expect(RequestMatcher requestMatcher)
-
expect
final JSONMockServer.JSONResponseActions expect(ExpectedCount expectedCount, RequestMatcher requestMatcher)
-
mock
final JSONMockServer.JSONResponseActions mock(ExpectedCount expectedCount, HttpMethod method, URI uri, Function1<JSONMockServerDSL, Unit> block)
-
mockGet
final JSONMockServer.JSONResponseActions mockGet(ExpectedCount expectedCount, URI uri, Function1<JSONMockServerDSL, Unit> block)
Establish a mock request with the method preset to GET.
-
mockPost
final JSONMockServer.JSONResponseActions mockPost(ExpectedCount expectedCount, URI uri, Function1<JSONMockServerDSL, Unit> block)
Establish a mock request with the method preset to POST.
-
mockPut
final JSONMockServer.JSONResponseActions mockPut(ExpectedCount expectedCount, URI uri, Function1<JSONMockServerDSL, Unit> block)
Establish a mock request with the method preset to PUT.
-
mockDelete
final JSONMockServer.JSONResponseActions mockDelete(ExpectedCount expectedCount, URI uri, Function1<JSONMockServerDSL, Unit> block)
Establish a mock request with the method preset to DELETE.
-
-
-
-