Uses of Annotation Type
org.assertj.core.util.CanIgnoreReturnValue
Packages that use CanIgnoreReturnValue
-
Uses of CanIgnoreReturnValue in org.assertj.core.api
Methods in org.assertj.core.api with annotations of type CanIgnoreReturnValueModifier and TypeMethodDescriptionstatic AbstractThrowableAssert
<?, ? extends Throwable> Assertions.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to capture and then assert on aThrowable
(easier done with lambdas).static AbstractThrowableAssert
<?, ? extends Throwable> Assertions.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, String description, Object... args) Allows to capture and then assert on aThrowable
likeassertThatThrownBy(ThrowingCallable)
but this method let you set the assertion description the same way you do withas(String, Object...)
.static AbstractThrowableAssert
<?, ? extends Throwable> AssertionsForClassTypes.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to capture and then assert on aThrowable
(easier done with lambdas).static AbstractThrowableAssert
<?, ? extends Throwable> AssertionsForClassTypes.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, String description, Object... args) Allows to capture and then assert on aThrowable
likeassertThatThrownBy(ThrowingCallable)
but this method let you set the assertion description the same way you do withas(String, Object...)
.static AbstractThrowableAssert
<?, ? extends Throwable> Java6Assertions.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Deprecated.Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.static AbstractThrowableAssert
<?, ? extends Throwable> Java6Assertions.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, String description, Object... args) Deprecated.Allows to capture and then assert on aThrowable
likeassertThatThrownBy(ThrowingCallable)
but this method let you set the assertion description the same way you do withas(String, Object...)
.default AbstractThrowableAssert
<?, ? extends Throwable> Java6StandardSoftAssertionsProvider.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.default AbstractThrowableAssert
<?, ? extends Throwable> Java6StandardSoftAssertionsProvider.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, String description, Object... args) Allows to capture and then assert on aThrowable
likeassertThatThrownBy(ThrowingCallable)
but this method let you set the assertion description the same way you do withas(String, Object...)
.default AbstractThrowableAssert
<?, ? extends Throwable> WithAssertions.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to capture and then assert on aThrowable
(easier done with lambdas).default AbstractThrowableAssert
<?, ? extends Throwable> WithAssertions.assertThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, String description, Object... args) Allows to capture and then assert on aThrowable
likeassertThatThrownBy(ThrowingCallable)
but this method let you set the assertion description the same way you do withas(String, Object...)
.static <T> ObjectAssert
<T> Assertions.assertWith
(T actual, Consumer<T>... requirements) Uses the given instance as the instance under test for all the assertions expressed as the passedConsumer
.default <T> ObjectAssert
<T> WithAssertions.assertWith
(T actual, Consumer<T>... requirements) Uses the given instance as the instance under test for all the assertions expressed as the passedConsumer
.<T> T
Fails with the given message.<T> T
Fails with the given message built likeString.format(String, Object...)
.<T> T
Fails with the given message and with theThrowable
that caused the failure.static <T> T
Throws anAssertionError
with the given message.static <T> T
Throws anAssertionError
with the given message built asString.format(String, Object...)
.static <T> T
Throws anAssertionError
with the given message and with theThrowable
that caused the failure.static <T> T
Throws anAssertionError
with the given message.static <T> T
Throws anAssertionError
with the given message built asString.format(String, Object...)
.static <T> T
Throws anAssertionError
with the given message and with theThrowable
that caused the failure.static <T> T
Throws anAssertionError
with the given message.static <T> T
Throws anAssertionError
with the given message built asString.format(String, Object...)
.static <T> T
Throws anAssertionError
with the given message and with theThrowable
that caused the failure.default <T> T
Throws anAssertionError
with the given message.default <T> T
Throws anAssertionError
with the given message built asString.format(String, Object...)
.default <T> T
Throws anAssertionError
with the given message and with theThrowable
that caused the failure.static <T> T
Assertions.failBecauseExceptionWasNotThrown
(Class<? extends Throwable> throwableClass) Throws anAssertionError
with a message explaining that aThrowable
of given class was expected to be thrown but had not been.static <T> T
Fail.failBecauseExceptionWasNotThrown
(Class<? extends Throwable> throwableClass) Throws anAssertionError
with a message explaining that aThrowable
of given class was expected to be thrown but had not been.default <T> T
WithAssertions.failBecauseExceptionWasNotThrown
(Class<? extends Throwable> throwableClass) Throws anAssertionError
with a message explaining that aThrowable
of given class was expected to be thrown but had not been.static <T> T
Assertions.shouldHaveThrown
(Class<? extends Throwable> throwableClass) Throws anAssertionError
with a message explaining that aThrowable
of given class was expected to be thrown but had not been.static <T> T
BDDAssertions.shouldHaveThrown
(Class<? extends Throwable> throwableClass) Throws anAssertionError
with a message explaining that aThrowable
of given class was expected to be thrown but had not been.static <T> T
Fail.shouldHaveThrown
(Class<? extends Throwable> throwableClass) Throws anAssertionError
with a message explaining that aThrowable
of given class was expected to be thrown but had not been.default <T> T
WithAssertions.shouldHaveThrown
(Class<? extends Throwable> throwableClass) Throws anAssertionError
with a message explaining that aThrowable
of given class was expected to be thrown but had not been.static AbstractThrowableAssert
<?, ? extends Throwable> BDDAssertions.thenThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to capture and then assert on aThrowable
(easier done with lambdas).static AbstractThrowableAssert
<?, ? extends Throwable> BDDAssertions.thenThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, String description, Object... args) Allows to capture and then assert on aThrowable
likethenThrownBy(ThrowingCallable)
but this method let you set the assertion description the same way you do withas(String, Object...)
.static AbstractThrowableAssert
<?, ? extends Throwable> Java6BDDAssertions.thenThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Deprecated.Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.static AbstractThrowableAssert
<?, ? extends Throwable> Java6BDDAssertions.thenThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, String description, Object... args) Deprecated.Allows to capture and then assert on aThrowable
likethenThrownBy(ThrowingCallable)
but this method let you set the assertion description the same way you do withas(String, Object...)
.default AbstractThrowableAssert
<?, ? extends Throwable> Java6BDDSoftAssertionsProvider.thenThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.default AbstractThrowableAssert
<?, ? extends Throwable> Java6BDDSoftAssertionsProvider.thenThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, String description, Object... args) Allows to capture and then assert on aThrowable
likethenThrownBy(ThrowingCallable)
but this method let you set the assertion description the same way you do withas(String, Object...)
.static <T> ObjectAssert
<T> Uses the given instance as the instance under test for all the assertions expressed as the passedConsumer
s.