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:
AbstractArrayAssert,AbstractAssert,AbstractAtomicFieldUpdaterAssert,AbstractAtomicReferenceAssert,AbstractBigDecimalAssert,AbstractBigIntegerAssert,AbstractBooleanArrayAssert,AbstractBooleanAssert,AbstractByteArrayAssert,AbstractByteAssert,AbstractCharacterAssert,AbstractCharArrayAssert,AbstractCharSequenceAssert,AbstractClassAssert,AbstractComparableAssert,AbstractCompletableFutureAssert,AbstractDateAssert,AbstractDoubleArrayAssert,AbstractDoubleAssert,AbstractEnumerableAssert,AbstractFileAssert,AbstractFloatArrayAssert,AbstractFloatAssert,AbstractFutureAssert,AbstractInputStreamAssert,AbstractInstantAssert,AbstractIntArrayAssert,AbstractIntegerAssert,AbstractIterableAssert,AbstractIterableSizeAssert,AbstractIteratorAssert,AbstractListAssert,AbstractLocalDateAssert,AbstractLocalDateTimeAssert,AbstractLocalTimeAssert,AbstractLongArrayAssert,AbstractLongAssert,AbstractMapAssert,AbstractMapSizeAssert,AbstractObjectArrayAssert,AbstractObjectAssert,AbstractOffsetDateTimeAssert,AbstractOffsetTimeAssert,AbstractOptionalAssert,AbstractOptionalDoubleAssert,AbstractOptionalIntAssert,AbstractOptionalLongAssert,AbstractPathAssert,AbstractPredicateAssert,AbstractPredicateLikeAssert,AbstractShortArrayAssert,AbstractShortAssert,AbstractStringAssert,AbstractTemporalAssert,AbstractThrowableAssert,AbstractUriAssert,AbstractUrlAssert,AbstractZonedDateTimeAssert,AtomicBooleanAssert,AtomicIntegerArrayAssert,AtomicIntegerAssert,AtomicIntegerFieldUpdaterAssert,AtomicLongArrayAssert,AtomicLongAssert,AtomicLongFieldUpdaterAssert,AtomicMarkableReferenceAssert,AtomicReferenceArrayAssert,AtomicReferenceAssert,AtomicReferenceFieldUpdaterAssert,AtomicStampedReferenceAssert,BigDecimalAssert,BigIntegerAssert,BooleanArrayAssert,BooleanAssert,ByteArrayAssert,ByteAssert,CharacterAssert,CharArrayAssert,CharSequenceAssert,ClassAssert,ClassBasedNavigableIterableAssert,ClassBasedNavigableListAssert,CompletableFutureAssert,DateAssert,DoubleArrayAssert,DoubleAssert,DoublePredicateAssert,FactoryBasedNavigableIterableAssert,FactoryBasedNavigableListAssert,FileAssert,FloatArrayAssert,FloatAssert,FutureAssert,GenericComparableAssert,InputStreamAssert,InstantAssert,IntArrayAssert,IntegerAssert,IntPredicateAssert,IterableAssert,IterableSizeAssert,IteratorAssert,ListAssert,LocalDateAssert,LocalDateTimeAssert,LocalTimeAssert,LongArrayAssert,LongAssert,LongPredicateAssert,MapAssert,MapSizeAssert,ObjectArrayAssert,ObjectAssert,OffsetDateTimeAssert,OffsetTimeAssert,OptionalAssert,OptionalDoubleAssert,OptionalIntAssert,OptionalLongAssert,PathAssert,PredicateAssert,ProxyableClassAssert,ProxyableIterableAssert,ProxyableListAssert,ProxyableMapAssert,ProxyableObjectArrayAssert,ProxyableObjectAssert,ProxyablePredicateAssert,RecursiveComparisonAssert,ShortArrayAssert,ShortAssert,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)
-
-