Interface ExtensionPoints<SELF extends ExtensionPoints<SELF,ACTUAL>,ACTUAL>

Type Parameters:
SELF - the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
ACTUAL - the type of the "actual" value.
All Known Subinterfaces:
Assert<SELF,ACTUAL>
All Known Implementing Classes:
Abstract2DArrayAssert, AbstractArrayAssert, AbstractAssert, AbstractAtomicFieldUpdaterAssert, AbstractAtomicReferenceAssert, AbstractBigDecimalAssert, AbstractBigDecimalScaleAssert, AbstractBigIntegerAssert, AbstractBooleanArrayAssert, AbstractBooleanAssert, AbstractByteArrayAssert, AbstractByteAssert, AbstractCharacterAssert, AbstractCharArrayAssert, AbstractCharSequenceAssert, AbstractClassAssert, AbstractCollectionAssert, AbstractComparableAssert, AbstractCompletableFutureAssert, AbstractDateAssert, AbstractDoubleArrayAssert, AbstractDoubleAssert, AbstractDurationAssert, AbstractEnumerableAssert, AbstractFileAssert, AbstractFileSizeAssert, AbstractFloatArrayAssert, AbstractFloatAssert, AbstractFutureAssert, AbstractInputStreamAssert, AbstractInstantAssert, AbstractIntArrayAssert, AbstractIntegerAssert, AbstractIterableAssert, AbstractIterableSizeAssert, AbstractIteratorAssert, AbstractListAssert, AbstractLocalDateAssert, AbstractLocalDateTimeAssert, AbstractLocalTimeAssert, AbstractLongAdderAssert, AbstractLongArrayAssert, AbstractLongAssert, AbstractMapAssert, AbstractMapSizeAssert, AbstractMatcherAssert, AbstractObjectArrayAssert, AbstractObjectAssert, AbstractOffsetDateTimeAssert, AbstractOffsetTimeAssert, AbstractOptionalAssert, AbstractOptionalDoubleAssert, AbstractOptionalIntAssert, AbstractOptionalLongAssert, AbstractPathAssert, AbstractPeriodAssert, AbstractPredicateAssert, AbstractShortArrayAssert, AbstractShortAssert, AbstractSpliteratorAssert, AbstractStringAssert, AbstractTemporalAssert, AbstractThrowableAssert, AbstractUniversalComparableAssert, AbstractUriAssert, AbstractUrlAssert, AbstractZonedDateTimeAssert, AtomicBooleanAssert, AtomicIntegerArrayAssert, AtomicIntegerAssert, AtomicIntegerFieldUpdaterAssert, AtomicLongArrayAssert, AtomicLongAssert, AtomicLongFieldUpdaterAssert, AtomicMarkableReferenceAssert, AtomicReferenceArrayAssert, AtomicReferenceAssert, AtomicReferenceFieldUpdaterAssert, AtomicStampedReferenceAssert, BigDecimalAssert, BigDecimalScaleAssert, BigIntegerAssert, Boolean2DArrayAssert, BooleanArrayAssert, BooleanAssert, Byte2DArrayAssert, ByteArrayAssert, ByteAssert, Char2DArrayAssert, CharacterAssert, CharArrayAssert, CharSequenceAssert, ClassAssert, ClassBasedNavigableIterableAssert, ClassBasedNavigableListAssert, CollectionAssert, CompletableFutureAssert, DateAssert, Double2DArrayAssert, DoubleArrayAssert, DoubleAssert, DoublePredicateAssert, DurationAssert, FactoryBasedNavigableIterableAssert, FactoryBasedNavigableListAssert, FileAssert, FileSizeAssert, Float2DArrayAssert, FloatArrayAssert, FloatAssert, FutureAssert, GenericComparableAssert, InputStreamAssert, InstantAssert, Int2DArrayAssert, IntArrayAssert, IntegerAssert, IntPredicateAssert, IterableAssert, IterableSizeAssert, IteratorAssert, ListAssert, LocalDateAssert, LocalDateTimeAssert, LocalTimeAssert, Long2DArrayAssert, LongAdderAssert, LongArrayAssert, LongAssert, LongPredicateAssert, MapAssert, MapSizeAssert, MatcherAssert, Object2DArrayAssert, ObjectArrayAssert, ObjectAssert, OffsetDateTimeAssert, OffsetTimeAssert, OptionalAssert, OptionalDoubleAssert, OptionalIntAssert, OptionalLongAssert, PathAssert, PeriodAssert, PredicateAssert, RecursiveAssertionAssert, RecursiveComparisonAssert, Short2DArrayAssert, ShortArrayAssert, ShortAssert, SoftThrowableAssertAlternative, SpliteratorAssert, StringAssert, ThrowableAssert, ThrowableAssertAlternative, UniversalComparableAssert, UriAssert, UrlAssert, ZonedDateTimeAssert

public interface ExtensionPoints<SELF extends ExtensionPoints<SELF,ACTUAL>,ACTUAL>
Mechanism for extending assertion classes.
Author:
Alex Ruiz, Mikhail Mazursky
  • Method Summary

    Modifier and Type
    Method
    Description
    doesNotHave(Condition<? super ACTUAL> condition)
    Verifies that the actual value does not satisfy the given condition.
    has(Condition<? super ACTUAL> condition)
    Verifies that the actual value satisfies the given condition.
    is(Condition<? super ACTUAL> condition)
    Verifies that the actual value satisfies the given condition.
    isNot(Condition<? super ACTUAL> condition)
    Verifies that the actual value does not satisfy the given condition.
    satisfies(Condition<? super ACTUAL> condition)
    Verifies that the actual value satisfies the given condition.
  • Method Details

    • is

      SELF is(Condition<? super ACTUAL> condition)
      Verifies that the actual value satisfies the given condition. This method is an alias for has(Condition).
      Parameters:
      condition - the given condition.
      Returns:
      this ExtensionPoints object.
      Throws:
      NullPointerException - if the given condition is null.
      AssertionError - if the actual value does not satisfy the given condition.
      See Also:
    • isNot

      SELF isNot(Condition<? super ACTUAL> condition)
      Verifies that the actual value does not satisfy the given condition. This method is an alias for doesNotHave(Condition).
      Parameters:
      condition - the given condition.
      Returns:
      this ExtensionPoints object.
      Throws:
      NullPointerException - if the given condition is null.
      AssertionError - if the actual value satisfies the given condition.
      See Also:
    • has

      SELF has(Condition<? super ACTUAL> condition)
      Verifies that the actual value satisfies the given condition. This method is an alias for is(Condition) .
      Parameters:
      condition - the given condition.
      Returns:
      this ExtensionPoints object.
      Throws:
      NullPointerException - if the given condition is null.
      AssertionError - if the actual value does not satisfy the given condition.
      See Also:
    • doesNotHave

      SELF doesNotHave(Condition<? super ACTUAL> condition)
      Verifies that the actual value does not satisfy the given condition. This method is an alias for isNot(Condition).
      Parameters:
      condition - the given condition.
      Returns:
      this ExtensionPoints object.
      Throws:
      NullPointerException - if the given condition is null.
      AssertionError - if the actual value satisfies the given condition.
      See Also:
    • satisfies

      SELF satisfies(Condition<? super ACTUAL> condition)
      Verifies that the actual value satisfies the given condition. This method is an alias for is(Condition).

      Example:

       // Given
       Condition<String> fairyTale = new Condition<>(s -> s.startsWith("Once upon a time"), "fairy tale start");
       // When
       String littleRedCap = "Once upon a time there was a dear little girl ...";
       // Then
       assertThat(littleRedCap).satisfies(fairyTale);
      Parameters:
      condition - the given condition.
      Returns:
      this ExtensionPoints object.
      Throws:
      NullPointerException - if the given condition is null.
      AssertionError - if the actual value does not satisfy the given condition.
      Since:
      3.11
      See Also: