public class JsonPathResultMatchers extends Object
An instance of this class is typically accessed via
MockMvcResultMatchers.jsonPath(java.lang.String, java.lang.Object...)
.
Modifier | Constructor and Description |
---|---|
protected |
JsonPathResultMatchers(String expression,
Object... args)
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
ResultMatcher |
doesNotExist()
Evaluate the JSON path and assert not content was found.
|
ResultMatcher |
exists()
Evaluate the JSONPath and assert that content exists.
|
ResultMatcher |
isArray()
Evluate the JSON path and assert the content found is an array.
|
<T> ResultMatcher |
value(org.hamcrest.Matcher<T> matcher)
Evaluate the JSONPath and assert the value of the content found with the
given Hamcrest
Matcher . |
ResultMatcher |
value(Object expectedValue)
Evaluate the JSONPath and assert the value of the content found.
|
protected JsonPathResultMatchers(String expression, Object... args)
MockMvcResultMatchers.jsonPath(String, Object...)
or
MockMvcResultMatchers.jsonPath(String, Matcher)
.public <T> ResultMatcher value(org.hamcrest.Matcher<T> matcher)
Matcher
.public ResultMatcher value(Object expectedValue)
public ResultMatcher exists()
public ResultMatcher doesNotExist()
public ResultMatcher isArray()