Package org.assertj.core.api
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,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,AbstractObjectArrayAssert,AbstractObjectAssert,AbstractOffsetDateTimeAssert,AbstractOffsetTimeAssert,AbstractOptionalAssert,AbstractOptionalDoubleAssert,AbstractOptionalIntAssert,AbstractOptionalLongAssert,AbstractPathAssert,AbstractPeriodAssert,AbstractPredicateAssert,AbstractPredicateLikeAssert,AbstractShortArrayAssert,AbstractShortAssert,AbstractSpliteratorAssert,AbstractStringAssert,AbstractTemporalAssert,AbstractThrowableAssert,AbstractUriAssert,AbstractUrlAssert,AbstractZonedDateTimeAssert,AtomicBooleanAssert,AtomicIntegerArrayAssert,AtomicIntegerAssert,AtomicIntegerFieldUpdaterAssert,AtomicLongArrayAssert,AtomicLongAssert,AtomicLongFieldUpdaterAssert,AtomicMarkableReferenceAssert,AtomicReferenceArrayAssert,AtomicReferenceAssert,AtomicReferenceFieldUpdaterAssert,AtomicStampedReferenceAssert,BigDecimalAssert,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,Object2DArrayAssert,ObjectArrayAssert,ObjectAssert,OffsetDateTimeAssert,OffsetTimeAssert,OptionalAssert,OptionalDoubleAssert,OptionalIntAssert,OptionalLongAssert,PathAssert,PeriodAssert,PredicateAssert,RecursiveComparisonAssert,Short2DArrayAssert,ShortArrayAssert,ShortAssert,SpliteratorAssert,StringAssert,ThrowableAssert,ThrowableAssertAlternative,UriAssert,UrlAssert,ZonedDateTimeAssert
public interface ExtensionPoints<SELF extends ExtensionPoints<SELF,ACTUAL>,ACTUAL>Mechanism for extending assertion classes.- Author:
- Alex Ruiz, Mikhail Mazursky
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SELFdoesNotHave(Condition<? super ACTUAL> condition)Verifies that the actual value does not satisfy the given condition.SELFhas(Condition<? super ACTUAL> condition)Verifies that the actual value satisfies the given condition.SELFis(Condition<? super ACTUAL> condition)Verifies that the actual value satisfies the given condition.SELFisNot(Condition<? super ACTUAL> condition)Verifies that the actual value does not satisfy the given condition.SELFsatisfies(Condition<? super ACTUAL> condition)Verifies that the actual value satisfies the given condition.
-
-
-
Method Detail
-
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 ExtensionPointsobject.- Throws:
NullPointerException- if the given condition isnull.AssertionError- if the actual value does not satisfy the given condition.- See Also:
has(Condition)
-
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 ExtensionPointsobject.- Throws:
NullPointerException- if the given condition isnull.AssertionError- if the actual value satisfies the given condition.- See Also:
isNot(Condition)
-
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 ExtensionPointsobject.- Throws:
NullPointerException- if the given condition isnull.AssertionError- if the actual value does not satisfy the given condition.- See Also:
is(Condition)
-
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 ExtensionPointsobject.- Throws:
NullPointerException- if the given condition isnull.AssertionError- if the actual value satisfies the given condition.- See Also:
isNot(Condition)
-
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 ExtensionPointsobject.- Throws:
NullPointerException- if the given condition isnull.AssertionError- if the actual value does not satisfy the given condition.- Since:
- 3.11
- See Also:
is(Condition)
-
-