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 for
JsonObject-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
info, myself -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonObjectAssertionassertionOf(JsonObject json) doesNotHavePath(String path) Verifies whether the specified path does not exist or does not resolve to a value in the context JsonObject.Verifies whether the specified path exists and resolves to a value in the context JsonObject.hasPathContainingExactly(String path, Object... expected) hasPathContainingExactly(String path, List<Object> expected) hasPathWithValue(String path, String value) hasPathWithValueContaining(String path, String value) isEmpty()pathContainsMatchingElement(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.pathHasSize(String path, int numExpectedEntries) Verifies whether the specified path contains a JSON array/collection of the expected size.toString()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 Details
-
assertionOf
-
hasPathWithValue
-
hasPathWithValueContaining
-
pathContainsMatchingElement
public JsonObjectAssertion pathContainsMatchingElement(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
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
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
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
-
hasEmptyCollectionForPath
-
hasPathContainingExactly
-
hasPathContainingExactly
-
toString
-