Package org.forgerock.util.test.assertj
Class AssertJPromiseAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<A,Promise<T,?>>
org.forgerock.util.test.assertj.AbstractAssertJPromiseAssert<Object,AssertJPromiseAssert,AssertJPromiseAssert.SuccessfulPromiseAssert>
org.forgerock.util.test.assertj.AssertJPromiseAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<AssertJPromiseAssert,
,Promise<Object, ?>> org.assertj.core.api.Descriptable<AssertJPromiseAssert>
,org.assertj.core.api.ExtensionPoints<AssertJPromiseAssert,
Promise<Object, ?>>
public final class AssertJPromiseAssert
extends AbstractAssertJPromiseAssert<Object,AssertJPromiseAssert,AssertJPromiseAssert.SuccessfulPromiseAssert>
Assertion class for a promise. Allows verification of the value that was completed with.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
An assertion class for making assertions on the successful completion value of aPromise
. -
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Method Summary
Modifier and TypeMethodDescriptionstatic AssertJPromiseAssert
assertThat
(Promise<?, ?> promise) Creates anAssertJPromiseAssert
instance for making assertions on aPromise
.static AssertJPromiseAssert
assertThatPromise
(Promise<?, ?> promise) Alias forassertThat(Promise)
.createSucceededAssert
(Object actual) Factory method for the succeeded assert class.Methods inherited from class org.forgerock.util.test.assertj.AbstractAssertJPromiseAssert
failedWithException, succeeded
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, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, 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
-
assertThat
Creates anAssertJPromiseAssert
instance for making assertions on aPromise
.- Parameters:
promise
- The promise for which assertions are being made.- Returns:
- A promise assertion object upon which assertions can be chained.
-
assertThatPromise
Alias forassertThat(Promise)
.This can be used in cases where the same test statically imports both this class and
Assertions
sinceassertThat(Promise)
clashes withAssertions.assertThat(java.util.concurrent.Future)
.- Parameters:
promise
- The promise for which assertions are being made.- Returns:
- A promise assertion object upon which assertions can be chained.
-
createSucceededAssert
Description copied from class:AbstractAssertJPromiseAssert
Factory method for the succeeded assert class.- Specified by:
createSucceededAssert
in classAbstractAssertJPromiseAssert<Object,
AssertJPromiseAssert, AssertJPromiseAssert.SuccessfulPromiseAssert> - Parameters:
actual
- The promised value.- Returns:
- The
AbstractAssert
implementation.
-