Class JsonObjectAssertion
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<JsonObjectAssertion,JsonObject>
-
- de.hybris.platform.integrationservices.asserts.JsonObjectAssertion
-
- All Implemented Interfaces:
org.assertj.core.api.Assert<JsonObjectAssertion,JsonObject>,org.assertj.core.api.Descriptable<JsonObjectAssertion>,org.assertj.core.api.ExtensionPoints<JsonObjectAssertion,JsonObject>
public class JsonObjectAssertion extends org.assertj.core.api.AbstractAssert<JsonObjectAssertion,JsonObject>
Assertions forJsonObject
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonObjectAssertionassertionOf(JsonObject json)JsonObjectAssertiondoesNotHavePath(java.lang.String path)Verifies whether the specified path does not exist or does not resolve to a value in the context JsonObject.JsonObjectAssertionhasEmptyCollectionForPath(java.lang.String path)JsonObjectAssertionhasPath(java.lang.String path)Verifies whether the specified path exists and resolves to a value in the context JsonObject.JsonObjectAssertionhasPathContainingExactly(java.lang.String path, java.lang.Object... expected)JsonObjectAssertionhasPathContainingExactly(java.lang.String path, java.util.List<java.lang.Object> expected)JsonObjectAssertionhasPathWithValue(java.lang.String path, java.lang.String value)JsonObjectAssertionhasPathWithValueContaining(java.lang.String path, java.lang.String value)JsonObjectAssertionisEmpty()JsonObjectAssertionpathContainsMatchingElement(java.lang.String path, com.jayway.jsonpath.Filter filter)Verifies whether the specified path pointing to a JSON array/collection element contains an element matching the condition.JsonObjectAssertionpathHasSize(java.lang.String path, int numExpectedEntries)Verifies whether the specified path contains a JSON array/collection of the expected size.java.lang.StringtoString()-
Methods inherited from class org.assertj.core.api.AbstractAssert
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, overridingErrorMessage, satisfies, setCustomRepresentation, throwAssertionError, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
-
-
-
-
Method Detail
-
assertionOf
public static JsonObjectAssertion assertionOf(JsonObject json)
-
hasPathWithValue
public JsonObjectAssertion hasPathWithValue(java.lang.String path, java.lang.String value)
-
hasPathWithValueContaining
public JsonObjectAssertion hasPathWithValueContaining(java.lang.String path, java.lang.String value)
-
pathContainsMatchingElement
public JsonObjectAssertion pathContainsMatchingElement(java.lang.String path, com.jayway.jsonpath.Filter filter)
Verifies whether the specified path pointing to a JSON array/collection element contains an element matching the condition.- Parameters:
path- a path to verifyfilter- a condition to be satisfied by at least one path value element.- Returns:
- the assertion for verification of this condition
-
hasPath
public JsonObjectAssertion hasPath(java.lang.String path)
Verifies whether the specified path exists and resolves to a value in the context JsonObject.- Parameters:
path- a path to check.- Returns:
- the assertion for verififcation of this condition.
-
doesNotHavePath
public 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.- Parameters:
path- a path to check.- Returns:
- the assertion for verififcation of this condition.
-
pathHasSize
public JsonObjectAssertion pathHasSize(java.lang.String path, int numExpectedEntries)
Verifies whether the specified path contains a JSON array/collection of the expected size.- Parameters:
path- a path to check in the context JSON object.numExpectedEntries- number of elements expected in the path- Returns:
- the assertion for verification of this condition
-
isEmpty
public JsonObjectAssertion isEmpty()
-
hasEmptyCollectionForPath
public JsonObjectAssertion hasEmptyCollectionForPath(java.lang.String path)
-
hasPathContainingExactly
public JsonObjectAssertion hasPathContainingExactly(java.lang.String path, java.lang.Object... expected)
-
hasPathContainingExactly
public JsonObjectAssertion hasPathContainingExactly(java.lang.String path, java.util.List<java.lang.Object> expected)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-