| Modifier and Type | Method and Description |
|---|---|
ForwardChainExpectation |
MockServerClient.when(HttpRequest httpRequest)
Specify an unlimited expectation that will respond regardless of the number of matching request
for example:
mockServerClient
.when(
new HttpRequest()
.withPath("/some_path")
.withBody("some_request_body")
)
.respond(
new HttpResponse()
.withBody("some_response_body")
.withHeaders(
new Header("responseName", "responseValue")
)
);
|
ForwardChainExpectation |
MockServerClient.when(HttpRequest httpRequest,
Times times)
Specify an limited expectation that will respond a specified number of times when the request 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")
)
);
|
Copyright © 2013. All Rights Reserved.