Package org.forgerock.json.test.assertj
Class AssertJJsonValueAssert.ObjectJsonValueAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<T,JsonValue>
org.forgerock.json.test.assertj.AssertJJsonValueAssert.AbstractJsonValueAssert<AssertJJsonValueAssert.ObjectJsonValueAssert>
org.forgerock.json.test.assertj.AssertJJsonValueAssert.ObjectJsonValueAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<AssertJJsonValueAssert.ObjectJsonValueAssert,
,JsonValue> org.assertj.core.api.Descriptable<AssertJJsonValueAssert.ObjectJsonValueAssert>
,org.assertj.core.api.ExtensionPoints<AssertJJsonValueAssert.ObjectJsonValueAssert,
JsonValue>
- Enclosing class:
- AssertJJsonValueAssert
public static final class AssertJJsonValueAssert.ObjectJsonValueAssert
extends AssertJJsonValueAssert.AbstractJsonValueAssert<AssertJJsonValueAssert.ObjectJsonValueAssert>
Class for assertions on object
JsonValue
.-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Method Summary
Modifier and TypeMethodDescriptionCheck that this object contains a property with the given name, and value.contains
(org.assertj.core.data.MapEntry... entries) Check that this object contains the specified properties.containsExactly
(org.assertj.core.data.MapEntry... entries) Check that this object contains exactly the specified properties.containsField
(String key) Check that this object contains a field with the specified name.containsFields
(String... keys) Check that this object contains fields with the specified names.containsOnly
(org.assertj.core.data.MapEntry... entries) Check that this object only contains the specified properties.doesNotContain
(String key, Object value) Check that this object does not contain a property with the given name, and value.doesNotContain
(org.assertj.core.data.MapEntry... entries) Check that this object does not contain a property with the given name, and value.isEmpty()
Check that the JSON is either an array or an object and is empty.Methods inherited from class org.forgerock.json.test.assertj.AssertJJsonValueAssert.AbstractJsonValueAssert
booleanAt, booleanIs, doesNotContain, doubleAt, doubleIs, hasArray, hasBoolean, hasNull, hasNumber, hasObject, hasPath, hasString, integerAt, integerIs, isArray, isBoolean, isDouble, isInteger, isLong, isNotNull, isNull, isNumber, isObject, isString, longAt, longIs, stringAt, stringIs
Methods inherited from class org.assertj.core.api.AbstractAssert
asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotOfAnyClassIn, isNotSameAs, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs
-
Method Details
-
isEmpty
Description copied from class:AssertJJsonValueAssert.AbstractJsonValueAssert
Check that the JSON is either an array or an object and is empty.- Overrides:
isEmpty
in classAssertJJsonValueAssert.AbstractJsonValueAssert<AssertJJsonValueAssert.ObjectJsonValueAssert>
- Returns:
- This assertion object.
-
contains
Check that this object contains a property with the given name, and value.- Parameters:
key
- The name of the object property.value
- The expected value.- Returns:
- This assert instance for further processing (if required).
- See Also:
-
AbstractMapAssert.containsEntry(K, V)
-
contains
public AssertJJsonValueAssert.ObjectJsonValueAssert contains(org.assertj.core.data.MapEntry... entries) Check that this object contains the specified properties.- Parameters:
entries
- The expected values.- Returns:
- This assert instance for further processing (if required).
- See Also:
-
AbstractMapAssert.contains(java.util.Map.Entry<? extends K, ? extends V>...)
-
containsOnly
public AssertJJsonValueAssert.ObjectJsonValueAssert containsOnly(org.assertj.core.data.MapEntry... entries) Check that this object only contains the specified properties.- Parameters:
entries
- The expected values.- Returns:
- This assert instance for further processing (if required).
- See Also:
-
AbstractMapAssert.containsOnly(java.util.Map.Entry<? extends K, ? extends V>...)
-
containsExactly
public AssertJJsonValueAssert.ObjectJsonValueAssert containsExactly(org.assertj.core.data.MapEntry... entries) Check that this object contains exactly the specified properties.- Parameters:
entries
- The expected values.- Returns:
- This assert instance for further processing (if required).
- See Also:
-
AbstractMapAssert.containsExactly(java.util.Map.Entry<? extends K, ? extends V>...)
-
containsField
Check that this object contains a field with the specified name.- Parameters:
key
- The expected key.- Returns:
- This assert instance for further processing (if required).
- See Also:
-
AbstractMapAssert.containsKey(K)
-
containsFields
Check that this object contains fields with the specified names.- Parameters:
keys
- The expected keys.- Returns:
- This assert instance for further processing (if required).
- See Also:
-
AbstractMapAssert.containsKeys(K...)
-
doesNotContain
Check that this object does not contain a property with the given name, and value.- Parameters:
key
- The name of the object property.value
- The expected value it should not equal if it exists.- Returns:
- This assert instance for further processing (if required).
- See Also:
-
AbstractMapAssert.doesNotContainEntry(K, V)
-
doesNotContain
public AssertJJsonValueAssert.ObjectJsonValueAssert doesNotContain(org.assertj.core.data.MapEntry... entries) Check that this object does not contain a property with the given name, and value.- Parameters:
entries
- The expected entries that should not exist.- Returns:
- This assert instance for further processing (if required).
- See Also:
-
AbstractMapAssert.doesNotContain(java.util.Map.Entry<? extends K, ? extends V>...)
-