public class JsonPathExpectationsHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
expression |
private JsonPath |
jsonPath |
| Constructor and Description |
|---|
JsonPathExpectationsHelper(java.lang.String expression,
java.lang.Object... args)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertValue(java.lang.Object value)
Apply the JSONPath and assert the resulting value.
|
<T> void |
assertValue(java.lang.String content,
Evaluate the JSONPath and assert the resulting value with the given
Matcher. |
void |
doesNotExist(java.lang.String content)
Evaluate the JSON path and assert it doesn't point to any content.
|
private java.lang.Object |
evaluateJsonPath(java.lang.String content) |
void |
exists(java.lang.String content)
Evaluate the JSON path and assert the resulting content exists.
|
private final java.lang.String expression
private final JsonPath jsonPath
public JsonPathExpectationsHelper(java.lang.String expression,
java.lang.Object... args)
expression - the JSONPath expressionargs - arguments to parameterize the JSONPath expression with using the
formatting specifiers defined in String.format(String, Object...)public <T> void assertValue(java.lang.String content,
matcher)
throws java.text.ParseException
Matcher.java.text.ParseExceptionprivate java.lang.Object evaluateJsonPath(java.lang.String content)
throws java.text.ParseException
java.text.ParseExceptionpublic void assertValue(java.lang.Object value)
throws java.text.ParseException
java.text.ParseExceptionpublic void exists(java.lang.String content)
throws java.text.ParseException
java.text.ParseExceptionpublic void doesNotExist(java.lang.String content)
throws java.text.ParseException
java.text.ParseException