Interface StandardSoftAssertionsProvider

    • Method Detail

      • assertThat

        default PathAssert assertThat​(java.nio.file.Path actual)
        Creates a new, proxied instance of a PathAssert
        Parameters:
        actual - the path
        Returns:
        the created assertion object
      • assertThatPath

        default AbstractPathAssert<?> assertThatPath​(java.nio.file.Path actual)
        Creates a new, proxied instance of a PathAssert

        Use this over assertThat(Path) in case of ambiguous method resolution when the object under test implements several interfaces Assertj provides assertThat for.

        Parameters:
        actual - the path to test
        Returns:
        the created assertion object
        Since:
        3.23.0
      • assertThat

        default <VALUE> OptionalAssert<VALUE> assertThat​(java.util.Optional<VALUE> actual)
        Create assertion for Optional.
        Type Parameters:
        VALUE - the type of the value contained in the Optional.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default OptionalDoubleAssert assertThat​(java.util.OptionalDouble actual)
        Create assertion for OptionalDouble.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default OptionalLongAssert assertThat​(java.util.OptionalLong actual)
        Create assertion for OptionalLong.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default MatcherAssert assertThat​(java.util.regex.Matcher actual)
        Create assertion for Matcher
        Parameters:
        actual - the actual matcher
        Returns:
        the created assertion object.
      • assertThat

        default OptionalIntAssert assertThat​(java.util.OptionalInt actual)
        Create assertion for OptionalInt.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default LocalDateAssert assertThat​(java.time.LocalDate actual)
        Creates a new instance of LocalDateAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default LocalDateTimeAssert assertThat​(java.time.LocalDateTime actual)
        Creates a new instance of LocalDateTimeAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default ZonedDateTimeAssert assertThat​(java.time.ZonedDateTime actual)
        Creates a new instance of ZonedDateTimeAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default LocalTimeAssert assertThat​(java.time.LocalTime actual)
        Creates a new instance of LocalTimeAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default OffsetTimeAssert assertThat​(java.time.OffsetTime actual)
        Creates a new instance of OffsetTimeAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default OffsetDateTimeAssert assertThat​(java.time.OffsetDateTime actual)
        Creates a new instance of OffsetDateTimeAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default InstantAssert assertThat​(java.time.Instant actual)
        Creates a new instance of InstantAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.7.0
      • assertThat

        default DurationAssert assertThat​(java.time.Duration actual)
        Creates a new instance of DurationAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.15.0
      • assertThat

        default PeriodAssert assertThat​(java.time.Period actual)
        Creates a new instance of PeriodAssert.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.17.0
      • assertThat

        default <RESULT> CompletableFutureAssert<RESULT> assertThat​(java.util.concurrent.CompletableFuture<RESULT> actual)
        Create assertion for CompletableFuture.
        Type Parameters:
        RESULT - the type of the value contained in the CompletableFuture.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default <RESULT> CompletableFutureAssert<RESULT> assertThat​(java.util.concurrent.CompletionStage<RESULT> actual)
        Create assertion for CompletionStage by converting it to a CompletableFuture and returning a CompletableFutureAssert.

        If the given CompletionStage is null, the CompletableFuture in the returned CompletableFutureAssert will also be null.

        Type Parameters:
        RESULT - the type of the value contained in the CompletionStage.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
      • assertThat

        default <T> PredicateAssert<T> assertThat​(java.util.function.Predicate<T> actual)
        Create assertion for Predicate.
        Type Parameters:
        T - the type of the value contained in the Predicate.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.5.0
      • assertThatPredicate

        default <T> PredicateAssert<T> assertThatPredicate​(java.util.function.Predicate<T> actual)
        Create assertion for Predicate.

        Use this over Java6StandardSoftAssertionsProvider.assertThat(Iterable) in case of ambiguous method resolution when the object under test implements several interfaces Assertj provides assertThat for.

        Type Parameters:
        T - the type of the value contained in the Predicate.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.23.0
      • assertThat

        default IntPredicateAssert assertThat​(java.util.function.IntPredicate actual)
        Create assertion for IntPredicate.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.5.0
      • assertThat

        default DoublePredicateAssert assertThat​(java.util.function.DoublePredicate actual)
        Create assertion for DoublePredicate.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.5.0
      • assertThat

        default LongPredicateAssert assertThat​(java.util.function.LongPredicate actual)
        Create assertion for DoublePredicate.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.5.0
      • assertThat

        default <ELEMENT> AbstractListAssert<?,​java.util.List<? extends ELEMENT>,​ELEMENT,​ObjectAssert<ELEMENT>> assertThat​(java.util.stream.Stream<? extends ELEMENT> actual)
        Creates a new instance of ListAssert from the given Stream.

        Be aware that to create the returned ListAssert the given the Stream is consumed so it won't be possible to use it again. Calling multiple methods on the returned ListAssert is safe as it only interacts with the List built from the Stream.

        Type Parameters:
        ELEMENT - the type of elements.
        Parameters:
        actual - the actual Stream value.
        Returns:
        the created assertion object.
      • assertThatStream

        default <ELEMENT> AbstractListAssert<?,​java.util.List<? extends ELEMENT>,​ELEMENT,​ObjectAssert<ELEMENT>> assertThatStream​(java.util.stream.Stream<? extends ELEMENT> actual)
        Creates a new instance of ListAssert from the given Stream.

        Use this over assertThat(Stream) in case of ambiguous method resolution when the object under test implements several interfaces Assertj provides assertThat for.

        Be aware that to create the returned ListAssert the given the Stream is consumed so it won't be possible to use it again. Calling multiple methods on the returned ListAssert is safe as it only interacts with the List built from the Stream.

        Type Parameters:
        ELEMENT - the type of elements.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.
        Since:
        3.23.0
      • assertThat

        default AbstractListAssert<?,​java.util.List<? extends java.lang.Double>,​java.lang.Double,​ObjectAssert<java.lang.Double>> assertThat​(java.util.stream.DoubleStream actual)
        Creates a new instance of ListAssert from the given DoubleStream.

        Be aware that to create the returned ListAssert the given the DoubleStream is consumed so it won't be possible to use it again. Calling multiple methods on the returned ListAssert is safe as it only interacts with the List built from the DoubleStream.

        Parameters:
        actual - the actual DoubleStream value.
        Returns:
        the created assertion object.
      • assertThat

        default AbstractListAssert<?,​java.util.List<? extends java.lang.Long>,​java.lang.Long,​ObjectAssert<java.lang.Long>> assertThat​(java.util.stream.LongStream actual)
        Creates a new instance of ListAssert from the given LongStream.

        Be aware that to create the returned ListAssert the given the LongStream is consumed so it won't be possible to use it again. Calling multiple methods on the returned ListAssert is safe as it only interacts with the List built from the LongStream.

        Parameters:
        actual - the actual LongStream value.
        Returns:
        the created assertion object.
      • assertThat

        default AbstractListAssert<?,​java.util.List<? extends java.lang.Integer>,​java.lang.Integer,​ObjectAssert<java.lang.Integer>> assertThat​(java.util.stream.IntStream actual)
        Creates a new instance of ListAssert from the given IntStream.

        Be aware that to create the returned ListAssert the given the IntStream is consumed so it won't be possible to use it again. Calling multiple methods on the returned ListAssert is safe as it only interacts with the List built from the IntStream.

        Parameters:
        actual - the actual IntStream value.
        Returns:
        the created assertion object.
      • assertThat

        default <ELEMENT> SpliteratorAssert<ELEMENT> assertThat​(java.util.Spliterator<ELEMENT> actual)
        Creates a new instance of SpliteratorAssert from the given Spliterator.
        Type Parameters:
        ELEMENT - the type of elements.
        Parameters:
        actual - the actual Spliterator value.
        Returns:
        the created assertion object.
      • assertThat

        default LongAdderAssert assertThat​(java.util.concurrent.atomic.LongAdder actual)
        Create assertion for LongAdder.
        Parameters:
        actual - the actual value.
        Returns:
        the created assertion object.