public class JsonObjectAssertion
extends <any>
JsonObject| Modifier and Type | Method and Description |
|---|---|
static JsonObjectAssertion |
assertionOf(JsonObject json) |
JsonObjectAssertion |
doesNotHavePath(java.lang.String path)
Verifies whether the specified path does not exist or does not resolve to a value in the context JsonObject.
|
JsonObjectAssertion |
hasEmptyCollectionForPath(java.lang.String path) |
JsonObjectAssertion |
hasPath(java.lang.String path)
Verifies whether the specified path exists and resolves to a value in the context JsonObject.
|
JsonObjectAssertion |
hasPathContainingExactly(java.lang.String path,
java.util.List<java.lang.Object> expected) |
JsonObjectAssertion |
hasPathContainingExactly(java.lang.String path,
java.lang.Object... expected) |
JsonObjectAssertion |
hasPathWithValue(java.lang.String path,
java.lang.String value) |
JsonObjectAssertion |
hasPathWithValueContaining(java.lang.String path,
java.lang.String value) |
JsonObjectAssertion |
isEmpty() |
JsonObjectAssertion |
pathContainsMatchingElement(java.lang.String path,
Filter filter)
Verifies whether the specified path pointing to a JSON array/collection element contains an element matching the condition.
|
JsonObjectAssertion |
pathHasSize(java.lang.String path,
int numExpectedEntries)
Verifies whether the specified path contains a JSON array/collection of the expected size.
|
java.lang.String |
toString() |
public static JsonObjectAssertion assertionOf(JsonObject json)
public JsonObjectAssertion hasPathWithValue(java.lang.String path, java.lang.String value)
public JsonObjectAssertion hasPathWithValueContaining(java.lang.String path, java.lang.String value)
public JsonObjectAssertion pathContainsMatchingElement(java.lang.String path, Filter filter)
path - a path to verifyfilter - a condition to be satisfied by at least one path value element.public JsonObjectAssertion hasPath(java.lang.String path)
path - a path to check.public JsonObjectAssertion doesNotHavePath(java.lang.String path)
path - a path to check.public JsonObjectAssertion pathHasSize(java.lang.String path, int numExpectedEntries)
path - a path to check in the context JSON object.numExpectedEntries - number of elements expected in the pathpublic JsonObjectAssertion isEmpty()
public JsonObjectAssertion hasEmptyCollectionForPath(java.lang.String path)
public JsonObjectAssertion hasPathContainingExactly(java.lang.String path, java.lang.Object... expected)
public JsonObjectAssertion hasPathContainingExactly(java.lang.String path, java.util.List<java.lang.Object> expected)
public java.lang.String toString()
Copyright © 2018 SAP SE. All Rights Reserved.