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 classAssertJJsonValueAssert.AbstractJsonValueAssert<T extends org.assertj.core.api.AbstractAssert<T,JsonValue>> Abstract class for assertions onJsonValue.static final classClass for assertions on arrayJsonValue.static final classAn assertion class for promises that returnJsonValues.static final classClass for assertions on simpleJsonValue.static final classClass for assertions on numberJsonValue.static final classClass for assertions on objectJsonValue.static final classClass for assertions onJsonValuepromises. -
Method Summary
Modifier and TypeMethodDescriptionassertThat(JsonValue value) Creates the relevantAbstractJsonValueAssertinstance for the providedJsonValue.assertThat(Promise<JsonValue, ?> promise) Creates a promise assert class forJsonValueinstances.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 relevantAbstractJsonValueAssertinstance for the providedJsonValue.- Parameters:
value- The actual value.- Returns:
- the subclass
AssertJJsonValueAssert.AbstractJsonValueAssertmatching best the kind ofJsonValue.
-
assertThat
public static AssertJJsonValueAssert.AssertJJsonValuePromiseAssert assertThat(Promise<JsonValue, ?> promise) Creates a promise assert class forJsonValueinstances.On calling the succeeded method, the
AssertJJsonValueAssert.AbstractJsonValueAssert.isObject()andAssertJJsonValueAssert.AbstractJsonValueAssert.isArray()must be used to access array/object specific assert methods.- Parameters:
promise- TheJsonValuepromise.- 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- TheJsonValuepromise.- Returns:
- The assertion object.
-