Package | Description |
---|---|
org.mockserver.client.serialization.model | |
org.mockserver.client.server | |
org.mockserver.matchers | |
org.mockserver.mock |
Modifier and Type | Method and Description |
---|---|
Times |
TimesDTO.buildObject() |
Constructor and Description |
---|
TimesDTO(Times times) |
Modifier and Type | Method and Description |
---|---|
ForwardChainExpectation |
MockServerClient.when(HttpRequest httpRequest,
Times times)
Specify an limited expectation that will respond a specified number of times when the http is matched
for example:
mockServerClient
.when(
new HttpRequest()
.withPath("/some_path")
.withBody("some_request_body"),
Times.exactly(5)
)
.respond(
new HttpResponse()
.withBody("some_response_body")
.withHeaders(
new Header("responseName", "responseValue")
)
);
|
ForwardChainExpectation |
MockServerClient.when(HttpRequest httpRequest,
Times times,
TimeToLive timeToLive)
Specify an limited expectation that will respond a specified number of times when the http is matched
for example:
mockServerClient
.when(
new HttpRequest()
.withPath("/some_path")
.withBody("some_request_body"),
Times.exactly(5),
TimeToLive.exactly(TimeUnit.SECONDS, 120),
)
.respond(
new HttpResponse()
.withBody("some_response_body")
.withHeaders(
new Header("responseName", "responseValue")
)
);
|
Modifier and Type | Method and Description |
---|---|
Times |
Times.decrement() |
static Times |
Times.exactly(int count) |
static Times |
Times.once() |
Times |
Times.setNotUnlimitedResponses() |
static Times |
Times.unlimited() |
Modifier and Type | Method and Description |
---|---|
Times |
Expectation.getTimes() |
Modifier and Type | Method and Description |
---|---|
Expectation |
MockServerMatcher.when(HttpRequest httpRequest,
Times times,
TimeToLive timeToLive) |
Constructor and Description |
---|
Expectation(HttpRequest httpRequest,
Times times,
TimeToLive timeToLive) |
Copyright © 2018. All rights reserved.