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 classAn 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 AssertJPromiseAssertassertThat(Promise<?, ?> promise) Creates anAssertJPromiseAssertinstance for making assertions on aPromise.static AssertJPromiseAssertassertThatPromise(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, succeededMethods inherited from class org.assertj.core.api.AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, 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, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Method Details
-
assertThat
Creates anAssertJPromiseAssertinstance 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
AssertionssinceassertThat(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:AbstractAssertJPromiseAssertFactory method for the succeeded assert class.- Specified by:
createSucceededAssertin classAbstractAssertJPromiseAssert<Object,AssertJPromiseAssert, AssertJPromiseAssert.SuccessfulPromiseAssert> - Parameters:
actual- The promised value.- Returns:
- The
AbstractAssertimplementation.
-