Modifier | Constructor and Description |
---|---|
protected |
JsonPathRequestMatchers(String expression,
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(Object expectedValue)
Apply the JSONPath and assert the resulting value.
|
protected JsonPathRequestMatchers(String expression, 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(Object expectedValue)
public RequestMatcher exists()
public RequestMatcher doesNotExist()
public RequestMatcher isArray()