public class JsonPathRequestMatchers
extends java.lang.Object
RequestMatcher's using a JSONPath expression.
An instance of this class is typically accessed via
RequestMatchers.jsonPath(..).| Modifier | Constructor and Description |
|---|---|
protected |
JsonPathRequestMatchers(java.lang.String expression,
java.lang.Object... args)
Class constructor, not for direct instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
RequestMatcher |
doesNotExist()
Evaluate the JSON path and assert the resulting content exists.
|
RequestMatcher |
exists()
Apply the JSONPath and assert the resulting value.
|
RequestMatcher |
isArray()
Assert the content at the given JSONPath is an array.
|
<T> RequestMatcher |
value(org.hamcrest.Matcher<T> matcher)
Evaluate the JSONPath and assert the resulting value with the given
Matcher. |
RequestMatcher |
value(java.lang.Object expectedValue)
Apply the JSONPath and assert the resulting value.
|
protected JsonPathRequestMatchers(java.lang.String expression,
java.lang.Object... args)
MockRestRequestMatchers.jsonPath(String, Matcher) or
MockRestRequestMatchers.jsonPath(String, Object...).expression - the JSONPath expressionargs - arguments to parameterize the JSONPath expression with using
the formatting specifiers defined in
String.format(String, Object...)public <T> RequestMatcher value(org.hamcrest.Matcher<T> matcher)
Matcher.public RequestMatcher value(java.lang.Object expectedValue)
public RequestMatcher exists()
public RequestMatcher doesNotExist()
public RequestMatcher isArray()