Uses of Class
org.assertj.core.api.AbstractThrowableAssert
-
Uses of AbstractThrowableAssert in org.assertj.core.api
Modifier and TypeClassDescriptionclass
AbstractThrowableAssert<SELF extends AbstractThrowableAssert<SELF,
ACTUAL>, ACTUAL extends Throwable> Base class for all implementations of assertions forThrowable
s.Modifier and TypeClassDescriptionclass
ThrowableAssert<ACTUAL extends Throwable>
Assertion methods forThrowable
s.Modifier and TypeFieldDescriptionstatic final InstanceOfAssertFactory
<Throwable, AbstractThrowableAssert<?, Throwable>> InstanceOfAssertFactories.THROWABLE
InstanceOfAssertFactory
for aThrowable
.Modifier and TypeMethodDescriptionstatic <T extends Throwable>
AbstractThrowableAssert<?, T> Assertions.assertThat
(T actual) Creates a new instance of
.ThrowableAssert
static <T extends Throwable>
AbstractThrowableAssert<?, T> AssertionsForClassTypes.assertThat
(T actual) Creates a new instance of
.ThrowableAssert
static <T extends Throwable>
AbstractThrowableAssert<?, T> Java6Assertions.assertThat
(T actual) Deprecated.Creates a new instance of
.ThrowableAssert
default <T extends Throwable>
AbstractThrowableAssert<?, T> WithAssertions.assertThat
(T actual) Creates a new instance of
.ThrowableAssert
static AbstractThrowableAssert
<?, ? extends Throwable> Assertions.assertThatCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Allows to capture and then assert on aThrowable
(easier done with lambdas).static AbstractThrowableAssert
<?, ? extends Throwable> AssertionsForClassTypes.assertThatCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Allows capturing and then assert on aThrowable
more easily when used with Java 8 lambdas.static AbstractThrowableAssert
<?, ? extends Throwable> Java6Assertions.assertThatCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Deprecated.Allows to capture and then assert on aThrowable
.default AbstractThrowableAssert
<?, ? extends Throwable> Java6StandardSoftAssertionsProvider.assertThatCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.default AbstractThrowableAssert
<?, ? extends Throwable> WithAssertions.assertThatCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.static 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 extends Throwable>
AbstractThrowableAssert<?, T> Assumptions.assumeThat
(T actual) Creates a new instance of
assumption.ThrowableAssert
default <T extends Throwable>
AbstractThrowableAssert<?, T> WithAssumptions.assumeThat
(T actual) Creates a new instance of
assumption.ThrowableAssert
static AbstractThrowableAssert
<?, ? extends Throwable> Assumptions.assumeThatCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Allows to capture and then assume on aThrowable
(easier done with lambdas).default AbstractThrowableAssert
<?, ? extends Throwable> WithAssumptions.assumeThatCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Allows to capture and then assume on aThrowable
(easier done with lambdas).static AbstractThrowableAssert
<?, ? extends Throwable> Assumptions.assumeThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to capture and then assume on aThrowable
(easier done with lambdas).default AbstractThrowableAssert
<?, ? extends Throwable> WithAssumptions.assumeThatThrownBy
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to capture and then assume on aThrowable
(easier done with lambdas).AbstractThrowableAssert.cause()
Returns a new assertion object that uses the cause of the current Throwable as the actual Throwable under test.AbstractThrowableAssert.getCause()
Deprecated.AbstractThrowableAssert.getRootCause()
Deprecated.userootCause()
instead.static <T extends Throwable>
AbstractThrowableAssert<?, T> BDDAssumptions.given
(T actual) Creates a new assumption's instance for aThrowable
value.static AbstractThrowableAssert
<?, ? extends Throwable> BDDAssumptions.givenCode
(ThrowableAssert.ThrowingCallable lambda) Creates a new assumption's instance from a no parameters lambda expression,() -> { /* some code */ }
.AbstractThrowableAssert
<?, ? extends Throwable> AbstractCompletableFutureAssert.hasFailedWithThrowableThat()
Deprecated.Although not 100% the same, consider usingAbstractCompletableFutureAssert.failsWithin(Duration)
orAbstractCompletableFutureAssert.failsWithin(long, TimeUnit)
instead:AbstractThrowableAssert.rootCause()
Returns a new assertion object that uses the root cause of the current Throwable as the actual Throwable under test.static <T extends Throwable>
AbstractThrowableAssert<?, T> BDDAssertions.then
(T actual) Creates a new instance of
.ThrowableAssert
static <T extends Throwable>
AbstractThrowableAssert<?, T> Java6BDDAssertions.then
(T actual) Deprecated.Creates a new instance of
.ThrowableAssert
static AbstractThrowableAssert
<?, ? extends Throwable> BDDAssertions.thenCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.AbstractThrowableAssert
<?, ? extends Throwable> Java6BDDAssertions.thenCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Deprecated.Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.default AbstractThrowableAssert
<?, ? extends Throwable> Java6BDDSoftAssertionsProvider.thenCode
(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable) Allows to capture and then assert on aThrowable
more easily when used with Java 8 lambdas.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...)
.Modifier and TypeMethodDescriptionstatic <T extends Throwable>
InstanceOfAssertFactory<T, AbstractThrowableAssert<?, T>> InstanceOfAssertFactory
for aThrowable
.
cause()
instead.