public class RequestMatcherBuilder
extends java.lang.Object
Request| Modifier and Type | Method and Description |
|---|---|
RequestMatcherBuilder |
anyBody() |
RequestMatcherBuilder |
anyQueryParams() |
RequestMatcherBuilder |
body(HttpBodyConverter httpBodyConverter)
Sets the request body using
HttpBodyConverter to match on exactly |
RequestMatcherBuilder |
body(RequestFieldMatcher matcher) |
RequestMatcherBuilder |
body(java.lang.String body)
Sets the request body
|
Request |
build() |
RequestMatcherBuilder |
header(java.lang.String key,
java.lang.String value)
Sets one request header
|
RequestMatcherBuilder |
queryParam(PlainTextFieldMatcher key,
PlainTextFieldMatcher value) |
RequestMatcherBuilder |
queryParam(PlainTextFieldMatcher key,
java.lang.String value) |
RequestMatcherBuilder |
queryParam(java.lang.String key,
java.lang.Object... values)
Sets the request query
|
RequestMatcherBuilder |
queryParam(java.lang.String key,
PlainTextFieldMatcher value) |
StubServiceBuilder |
willReturn(ResponseBuilder responseBuilder)
Sets the expected response
|
public RequestMatcherBuilder body(java.lang.String body)
body - the request body to match on exactlyRequestMatcherBuilder for further customizationspublic RequestMatcherBuilder body(HttpBodyConverter httpBodyConverter)
HttpBodyConverter to match on exactlyhttpBodyConverter - custom http body converterRequestMatcherBuilder for further customizationspublic RequestMatcherBuilder body(RequestFieldMatcher matcher)
public RequestMatcherBuilder anyBody()
public RequestMatcherBuilder header(java.lang.String key, java.lang.String value)
key - the header key to match onvalue - the header value to match onRequestMatcherBuilder for further customizationspublic RequestMatcherBuilder queryParam(java.lang.String key, java.lang.Object... values)
key - the query params key to match onvalues - the query params values to match onRequestMatcherBuilder for further customizationspublic RequestMatcherBuilder queryParam(java.lang.String key, PlainTextFieldMatcher value)
public RequestMatcherBuilder queryParam(PlainTextFieldMatcher key, java.lang.String value)
public RequestMatcherBuilder queryParam(PlainTextFieldMatcher key, PlainTextFieldMatcher value)
public RequestMatcherBuilder anyQueryParams()
public StubServiceBuilder willReturn(ResponseBuilder responseBuilder)
responseBuilder - the builder for responseStubServiceBuilder for chaining the next RequestMatcherBuilderResponseBuilderpublic Request build()