abstract class MockRestRequestMatchers
Static factory methods for RequestMatcher classes. Typically used to provide input for MockRestServiceServer#expect(RequestMatcher)
. Eclipse Users
Consider adding this class as a Java editor favorite. To navigate to this setting, open the Preferences and type "favorites".
Author
Craig Walls
Author
Rossen Stoyanchev
Since
3.2
MockRestRequestMatchers()
Static factory methods for RequestMatcher classes. Typically used to provide input for Consider adding this class as a Java editor favorite. To navigate to this setting, open the Preferences and type "favorites". |
open static fun anything(): RequestMatcher
Match to any request. |
|
open static fun content(): ContentRequestMatchers
Access to request body matchers. |
|
open static fun header(name: String, vararg matchers: Matcher<in String>): RequestMatcher
Assert request header values with the given Hamcrest matcher. open static fun header(name: String, vararg expectedValues: String): RequestMatcher
Assert request header values. |
|
open static fun jsonPath(expression: String, vararg args: Any): JsonPathRequestMatchers
Access to request body matchers using a JsonPath expression to inspect a specific subset of the body. The JSON path expression can be a parameterized string using formatting specifiers as defined in open static fun <T : Any> jsonPath(expression: String, matcher: Matcher<T>): RequestMatcher
Access to request body matchers using a JsonPath expression to inspect a specific subset of the body and a Hamcrest match for asserting the value found at the JSON path. |
|
open static fun method(method: HttpMethod): RequestMatcher
Assert the HttpMethod of the request. |
|
open static fun queryParam(name: String, vararg matchers: Matcher<in String>): RequestMatcher
Assert request query parameter values with the given Hamcrest matcher. open static fun queryParam(name: String, vararg expectedValues: String): RequestMatcher
Assert request query parameter values. |
|
open static fun requestTo(matcher: Matcher<String>): RequestMatcher
Assert the request URI string with the given matcher. open static fun requestTo(expectedUri: String): RequestMatcher
Assert the request URI matches the given string. open static fun requestTo(uri: URI): RequestMatcher
Expect a request to the given URI. |
|
open static fun requestToUriTemplate(expectedUri: String, vararg uriVars: Any): RequestMatcher
Variant of |
|
open static fun xpath(expression: String, vararg args: Any): XpathRequestMatchers
Access to request body matchers using an XPath to inspect a specific subset of the body. The XPath expression can be a parameterized string using formatting specifiers as defined in open static fun xpath(expression: String, namespaces: MutableMap<String, String>, vararg args: Any): XpathRequestMatchers
Access to response body matchers using an XPath to inspect a specific subset of the body. The XPath expression can be a parameterized string using formatting specifiers as defined in |