Package | Description |
---|---|
org.mockserver.client.server | |
org.mockserver.initialize | |
org.mockserver.integration | |
org.mockserver.integration.server |
Modifier and Type | Method and Description |
---|---|
MockServerClient |
MockServerClient.clear(HttpRequest httpRequest)
Clear all expectations and logs that match the http
|
MockServerClient |
MockServerClient.clear(HttpRequest httpRequest,
MockServerClient.TYPE type)
Clear expectations, logs or both that match the http
|
MockServerClient |
MockServerClient.dumpToLog()
Pretty-print the json for all expectations to the log.
|
MockServerClient |
MockServerClient.dumpToLog(HttpRequest httpRequest)
Pretty-print the json for all expectations that match the request to the log.
|
MockServerClient |
MockServerClient.reset()
Reset MockServer by clearing all expectations
|
MockServerClient |
MockServerClient.stop()
Stop MockServer gracefully (only support for Netty and Vert.X versions, not supported for WAR version)
|
MockServerClient |
MockServerClient.stop(boolean ignoreFailure) |
MockServerClient |
MockServerClient.verify(HttpRequest... httpRequests)
Verify a list of requests have been sent in the order specified for example:
mockServerClient
.verify(
request()
.withPath("/first_request")
.withBody("some_request_body"),
request()
.withPath("/second_request")
.withBody("some_request_body")
);
|
MockServerClient |
MockServerClient.verify(HttpRequest httpRequest,
VerificationTimes times)
Verify a request has been sent for example:
mockServerClient
.verify(
request()
.withPath("/some_path")
.withBody("some_request_body"),
VerificationTimes.exactly(3)
);
VerificationTimes supports multiple static factory methods:
once() - verify the request was only received once
exactly(n) - verify the request was only received exactly n times
atLeast(n) - verify the request was only received at least n times
|
MockServerClient |
MockServerClient.verifyZeroInteractions()
Verify no requests have been have been sent.
|
Constructor and Description |
---|
ForwardChainExpectation(MockServerClient mockServerClient,
Expectation expectation) |
Modifier and Type | Method and Description |
---|---|
void |
ExpectationInitializer.initializeExpectations(MockServerClient mockServerClient) |
Modifier and Type | Class and Description |
---|---|
class |
ClientAndServer |
Modifier and Type | Field and Description |
---|---|
protected static MockServerClient |
AbstractClientServerIntegrationTest.mockServerClient |
Copyright © 2018. All rights reserved.