Class AbstractAssertJPromiseAssert<T,A extends AbstractAssertJPromiseAssert<T,A,S>,S extends org.assertj.core.api.AbstractAssert<S,T>>

java.lang.Object
org.assertj.core.api.AbstractAssert<A,Promise<T,?>>
org.forgerock.util.test.assertj.AbstractAssertJPromiseAssert<T,A,S>
Type Parameters:
T - The promised type.
A - The type of assert that this class is.
S - The type of assert that is returned from the succeeded method.
All Implemented Interfaces:
org.assertj.core.api.Assert<A,Promise<T,?>>, org.assertj.core.api.Descriptable<A>, org.assertj.core.api.ExtensionPoints<A,Promise<T,?>>
Direct Known Subclasses:
AssertJJsonValueAssert.AssertJJsonValuePromiseAssert, AssertJPromiseAssert

public abstract class AbstractAssertJPromiseAssert<T,A extends AbstractAssertJPromiseAssert<T,A,S>,S extends org.assertj.core.api.AbstractAssert<S,T>> extends org.assertj.core.api.AbstractAssert<A,Promise<T,?>>
Assertion class for a promise. Allows verification of the value that was completed with.
  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructs a new assertion on promise.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract S
    Factory method for the succeeded assert class.
    final org.assertj.core.api.AbstractThrowableAssert<?,? extends Throwable>
    Asserts that the promise failed.
    final S
    Asserts that the promise 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
  • Constructor Details

    • AbstractAssertJPromiseAssert

      protected AbstractAssertJPromiseAssert(Promise<T,?> promise, Class<A> type)
      Constructs a new assertion on promise.
      Parameters:
      promise - the actual promise to check
      type - the type of assertion
  • Method Details

    • createSucceededAssert

      protected abstract S createSucceededAssert(T actual)
      Factory method for the succeeded assert class.
      Parameters:
      actual - The promised value.
      Returns:
      The AbstractAssert implementation.
    • succeeded

      public final S succeeded()
      Asserts that the promise succeeded.
      Returns:
      An AbstractAssert for making assertions on the promise's completed value.
    • failedWithException

      public final org.assertj.core.api.AbstractThrowableAssert<?,? extends Throwable> failedWithException()
      Asserts that the promise failed.
      Returns:
      A ThrowableAssert for making assertions on the promise's failure cause.