Interface StandardSoftAssertionsProvider
- All Superinterfaces:
AfterAssertionErrorCollected,AssertionErrorCollector,Java6StandardSoftAssertionsProvider,SoftAssertionsProvider
- All Known Implementing Classes:
AutoCloseableSoftAssertions,JUnitJupiterSoftAssertions,JUnitSoftAssertions,SoftAssertions
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.assertj.core.api.SoftAssertionsProvider
SoftAssertionsProvider.ThrowingRunnable -
Method Summary
Modifier and TypeMethodDescriptiondefault PathAssertassertThat(Path actual) Creates a new, proxied instance of aPathAssertdefault DurationAssertassertThat(Duration actual) Creates a new instance of.DurationAssertdefault InstantAssertassertThat(Instant actual) Creates a new instance of.InstantAssertdefault LocalDateAssertassertThat(LocalDate actual) Creates a new instance of.LocalDateAssertdefault LocalDateTimeAssertassertThat(LocalDateTime actual) Creates a new instance of.LocalDateTimeAssertdefault LocalTimeAssertassertThat(LocalTime actual) Creates a new instance of.LocalTimeAssertdefault OffsetDateTimeAssertassertThat(OffsetDateTime actual) Creates a new instance of.OffsetDateTimeAssertdefault OffsetTimeAssertassertThat(OffsetTime actual) Creates a new instance of.OffsetTimeAssertdefault PeriodAssertassertThat(Period actual) Creates a new instance of.PeriodAssertdefault YearMonthAssertassertThat(YearMonth actual) Creates a new instance of.YearMonthAssertdefault ZonedDateTimeAssertassertThat(ZonedDateTime actual) Creates a new instance of.ZonedDateTimeAssertdefault LongAdderAssertassertThat(LongAdder actual) Create assertion forLongAdder.default <RESULT> CompletableFutureAssert<RESULT> assertThat(CompletableFuture<RESULT> actual) Create assertion forCompletableFuture.default <RESULT> CompletableFutureAssert<RESULT> assertThat(CompletionStage<RESULT> actual) Create assertion forCompletionStageby converting it to aCompletableFutureand returning aCompletableFutureAssert.default DoublePredicateAssertassertThat(DoublePredicate actual) Create assertion forDoublePredicate.default IntPredicateAssertassertThat(IntPredicate actual) Create assertion forIntPredicate.default LongPredicateAssertassertThat(LongPredicate actual) Create assertion forDoublePredicate.default <T> PredicateAssert<T> assertThat(Predicate<T> actual) Create assertion forPredicate.default <VALUE> OptionalAssert<VALUE> assertThat(Optional<VALUE> actual) Create assertion forOptional.default OptionalDoubleAssertassertThat(OptionalDouble actual) Create assertion forOptionalDouble.default OptionalIntAssertassertThat(OptionalInt actual) Create assertion forOptionalInt.default OptionalLongAssertassertThat(OptionalLong actual) Create assertion forOptionalLong.default MatcherAssertassertThat(Matcher actual) Create assertion forMatcherdefault <ELEMENT> SpliteratorAssert<ELEMENT> assertThat(Spliterator<ELEMENT> actual) Creates a new instance offrom the givenSpliteratorAssertSpliterator.default AbstractListAssert<?, List<? extends Double>, Double, ObjectAssert<Double>> assertThat(DoubleStream actual) Creates a new instance offrom the givenListAssertDoubleStream.default AbstractListAssert<?, List<? extends Integer>, Integer, ObjectAssert<Integer>> assertThat(IntStream actual) Creates a new instance offrom the givenListAssertIntStream.default AbstractListAssert<?, List<? extends Long>, Long, ObjectAssert<Long>> assertThat(LongStream actual) Creates a new instance offrom the givenListAssertLongStream.default <ELEMENT> AbstractListAssert<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> assertThat(Stream<? extends ELEMENT> actual) Creates a new instance offrom the givenListAssertStream.default AbstractPathAssert<?> assertThatPath(Path actual) Creates a new, proxied instance of aPathAssertdefault <T> PredicateAssert<T> assertThatPredicate(Predicate<T> actual) Create assertion forPredicate.default <ELEMENT> AbstractListAssert<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> assertThatStream(Stream<? extends ELEMENT> actual) Creates a new instance offrom the givenListAssertStream.default TemporalAssertassertThatTemporal(Temporal actual) Create assertion forTemporalAssert.Methods inherited from interface org.assertj.core.api.AssertionErrorCollector
assertionErrorsCollected, collectAssertionError, getDelegate, onAssertionErrorCollected, setDelegate, succeeded, wasSuccessMethods inherited from interface org.assertj.core.api.Java6StandardSoftAssertionsProvider
assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThatCharSequence, assertThatCode, assertThatCollection, assertThatComparable, assertThatException, assertThatExceptionOfType, assertThatIllegalArgumentException, assertThatIllegalStateException, assertThatIndexOutOfBoundsException, assertThatIOException, assertThatIterable, assertThatIterator, assertThatList, assertThatNullPointerException, assertThatObject, assertThatReflectiveOperationException, assertThatRuntimeException, assertThatThrownBy, assertThatThrownByMethods inherited from interface org.assertj.core.api.SoftAssertionsProvider
assertAll, assertAlso, check, proxy
-
Method Details
-
assertThat
Creates a new, proxied instance of aPathAssert- Parameters:
actual- the path- Returns:
- the created assertion object
-
assertThatPath
Creates a new, proxied instance of aPathAssertUse this over
assertThat(Path)in case of ambiguous method resolution when the object under test implements several interfaces Assertj providesassertThatfor.- Parameters:
actual- the path to test- Returns:
- the created assertion object
- Since:
- 3.23.0
-
assertThat
Create assertion forOptional.- Type Parameters:
VALUE- the type of the value contained in theOptional.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Create assertion forOptionalDouble.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Create assertion forOptionalLong.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Create assertion forMatcher- Parameters:
actual- the actual matcher- Returns:
- the created assertion object.
-
assertThat
Create assertion forOptionalInt.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Creates a new instance of.LocalDateAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Creates a new instance of.YearMonthAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.26.0
-
assertThat
Creates a new instance of.LocalDateTimeAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Creates a new instance of.ZonedDateTimeAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Creates a new instance of.LocalTimeAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Creates a new instance of.OffsetTimeAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Creates a new instance of.OffsetDateTimeAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Creates a new instance of.InstantAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.7.0
-
assertThat
Creates a new instance of.DurationAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.15.0
-
assertThat
Creates a new instance of.PeriodAssert- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.17.0
-
assertThat
Create assertion forCompletableFuture.- Type Parameters:
RESULT- the type of the value contained in theCompletableFuture.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Create assertion forCompletionStageby converting it to aCompletableFutureand returning aCompletableFutureAssert.If the given
CompletionStageis null, theCompletableFuturein the returnedCompletableFutureAssertwill also be null.- Type Parameters:
RESULT- the type of the value contained in theCompletionStage.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThat
Create assertion forPredicate.- Type Parameters:
T- the type of the value contained in thePredicate.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.5.0
-
assertThatPredicate
Create assertion forPredicate.Use this over
Java6StandardSoftAssertionsProvider.assertThat(Iterable)in case of ambiguous method resolution when the object under test implements several interfaces Assertj providesassertThatfor.- Type Parameters:
T- the type of the value contained in thePredicate.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.23.0
-
assertThat
Create assertion forIntPredicate.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.5.0
-
assertThat
Create assertion forDoublePredicate.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.5.0
-
assertThat
Create assertion forDoublePredicate.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.5.0
-
assertThat
default <ELEMENT> AbstractListAssert<?,List<? extends ELEMENT>, assertThatELEMENT, ObjectAssert<ELEMENT>> (Stream<? extends ELEMENT> actual) Creates a new instance offrom the givenListAssertStream.Be aware that to create the returned
ListAssertthe given theStreamis consumed so it won't be possible to use it again. Calling multiple methods on the returnedListAssertis safe as it only interacts with theListbuilt from theStream.- Type Parameters:
ELEMENT- the type of elements.- Parameters:
actual- the actualStreamvalue.- Returns:
- the created assertion object.
-
assertThatStream
default <ELEMENT> AbstractListAssert<?,List<? extends ELEMENT>, assertThatStreamELEMENT, ObjectAssert<ELEMENT>> (Stream<? extends ELEMENT> actual) Creates a new instance offrom the givenListAssertStream.Use this over
assertThat(Stream)in case of ambiguous method resolution when the object under test implements several interfaces Assertj providesassertThatfor.Be aware that to create the returned
ListAssertthe given theStreamis consumed so it won't be possible to use it again. Calling multiple methods on the returnedListAssertis safe as it only interacts with theListbuilt from theStream.- Type Parameters:
ELEMENT- the type of elements.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.23.0
-
assertThat
default AbstractListAssert<?,List<? extends Double>, assertThatDouble, ObjectAssert<Double>> (DoubleStream actual) Creates a new instance offrom the givenListAssertDoubleStream.Be aware that to create the returned
ListAssertthe given theDoubleStreamis consumed so it won't be possible to use it again. Calling multiple methods on the returnedListAssertis safe as it only interacts with theListbuilt from theDoubleStream.- Parameters:
actual- the actualDoubleStreamvalue.- Returns:
- the created assertion object.
-
assertThat
default AbstractListAssert<?,List<? extends Long>, assertThatLong, ObjectAssert<Long>> (LongStream actual) Creates a new instance offrom the givenListAssertLongStream.Be aware that to create the returned
ListAssertthe given theLongStreamis consumed so it won't be possible to use it again. Calling multiple methods on the returnedListAssertis safe as it only interacts with theListbuilt from theLongStream.- Parameters:
actual- the actualLongStreamvalue.- Returns:
- the created assertion object.
-
assertThat
default AbstractListAssert<?,List<? extends Integer>, assertThatInteger, ObjectAssert<Integer>> (IntStream actual) Creates a new instance offrom the givenListAssertIntStream.Be aware that to create the returned
ListAssertthe given theIntStreamis consumed so it won't be possible to use it again. Calling multiple methods on the returnedListAssertis safe as it only interacts with theListbuilt from theIntStream.- Parameters:
actual- the actualIntStreamvalue.- Returns:
- the created assertion object.
-
assertThat
Creates a new instance offrom the givenSpliteratorAssertSpliterator.- Type Parameters:
ELEMENT- the type of elements.- Parameters:
actual- the actualSpliteratorvalue.- Returns:
- the created assertion object.
-
assertThat
Create assertion forLongAdder.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
-
assertThatTemporal
Create assertion forTemporalAssert.- Parameters:
actual- the actual value.- Returns:
- the created assertion object.
- Since:
- 3.26.1
-