Package | Description |
---|---|
org.mockserver.client.proxy | |
org.mockserver.integration | |
org.mockserver.integration.proxy |
Modifier and Type | Method and Description |
---|---|
ProxyClient |
ProxyClient.clear(HttpRequest httpRequest)
Clear all recorded requests that match the httpRequest parameter
|
ProxyClient |
ProxyClient.dumpToLogAsJava()
Output Java code for creating all requests / responses as Expectations to the log.
|
ProxyClient |
ProxyClient.dumpToLogAsJava(HttpRequest httpRequest)
Output Java code for creating matching requests and their responses as Expectations to the log.
|
ProxyClient |
ProxyClient.dumpToLogAsJSON()
Pretty-print the json for all requests / responses as Expectations to the log.
|
ProxyClient |
ProxyClient.dumpToLogAsJSON(HttpRequest httpRequest)
Pretty-print the json for matching requests and their responses as Expectations to the log.
|
ProxyClient |
ProxyClient.reset()
Reset the proxy by clearing recorded requests
|
ProxyClient |
ProxyClient.stop()
Stop the proxy gracefully (only support for Netty and Vert.X versions, not supported for WAR version)
|
ProxyClient |
ProxyClient.stop(boolean ignoreFailure) |
ProxyClient |
ProxyClient.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")
);
|
ProxyClient |
ProxyClient.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
|
Modifier and Type | Class and Description |
---|---|
class |
ClientAndProxy |
Modifier and Type | Method and Description |
---|---|
abstract ProxyClient |
AbstractClientProxyIntegrationTest.getProxyClient() |
abstract ProxyClient |
AbstractClientSecureProxyIntegrationTest.getProxyClient() |
Copyright © 2018. All rights reserved.