Class AbstractStandardSoftAssertions

    • Constructor Detail

      • AbstractStandardSoftAssertions

        public AbstractStandardSoftAssertions()
    • Method Detail

      • assertThat

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

        public <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

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

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

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

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

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

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

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

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

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

        public 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

        public <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

        public <T> SoftAssertionPredicateAssert<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
      • assertThat

        public 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

        public 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

        public 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

        public <ELEMENT,​STREAM extends java.util.stream.BaseStream<ELEMENT,​STREAM>> ListAssert<ELEMENT> assertThat​(java.util.stream.BaseStream<? extends ELEMENT,​STREAM> actual)
        Creates a new instance of ListAssert from the given BaseStream.

        Be aware that to create the returned ListAssert the given the BaseStream 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 BaseStream.

        This method accepts Stream and primitive stream variants IntStream, LongStream and DoubleStream.

        Parameters:
        actual - the actual BaseStream value.
        Returns:
        the created assertion object.