Package org.forgerock.json.test.assertj
Class AssertJJsonValueAssert
java.lang.Object
org.forgerock.json.test.assertj.AssertJJsonValueAssert
Main that will provide the assertions on
JsonValue
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
AssertJJsonValueAssert.AbstractJsonValueAssert<T extends org.assertj.core.api.AbstractAssert<T,
JsonValue>> Abstract class for assertions onJsonValue
.static final class
Class for assertions on arrayJsonValue
.static final class
An assertion class for promises that returnJsonValue
s.static final class
Class for assertions on simpleJsonValue
.static final class
Class for assertions on numberJsonValue
.static final class
Class for assertions on objectJsonValue
.static final class
Class for assertions onJsonValue
promises. -
Method Summary
Modifier and TypeMethodDescriptionassertThat
(JsonValue value) Creates the relevantAbstractJsonValueAssert
instance for the providedJsonValue
.assertThat
(Promise<JsonValue, ?> promise) Creates a promise assert class forJsonValue
instances.assertThatJsonValue
(Promise<JsonValue, ?> promise) An alias forassertThat(Promise)
for the case where different Promise assertThat methods are statically imported and would clash.
-
Method Details
-
assertThat
Creates the relevantAbstractJsonValueAssert
instance for the providedJsonValue
.- Parameters:
value
- The actual value.- Returns:
- the subclass
AssertJJsonValueAssert.AbstractJsonValueAssert
matching best the kind ofJsonValue
.
-
assertThat
public static AssertJJsonValueAssert.AssertJJsonValuePromiseAssert assertThat(Promise<JsonValue, ?> promise) Creates a promise assert class forJsonValue
instances.On calling the succeeded method, the
AssertJJsonValueAssert.AbstractJsonValueAssert.isObject()
andAssertJJsonValueAssert.AbstractJsonValueAssert.isArray()
must be used to access array/object specific assert methods.- Parameters:
promise
- TheJsonValue
promise.- Returns:
- The assertion object.
-
assertThatJsonValue
public static AssertJJsonValueAssert.AssertJJsonValuePromiseAssert assertThatJsonValue(Promise<JsonValue, ?> promise) An alias forassertThat(Promise)
for the case where different Promise assertThat methods are statically imported and would clash.- Parameters:
promise
- TheJsonValue
promise.- Returns:
- The assertion object.
-