Uses of Interface
org.assertj.core.api.ThrowableAssert.ThrowingCallable
-
Uses of ThrowableAssert.ThrowingCallable in org.assertj.core.api
Modifier and TypeMethodDescriptionstatic 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 to capture 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 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).static Exception
Assertions.catchException
(ThrowableAssert.ThrowingCallable shouldRaiseException) Allows catching an instance ofException
.static Exception
BDDAssertions.catchException
(ThrowableAssert.ThrowingCallable shouldRaiseException) Allows catching an instance ofException
.default Exception
WithAssertions.catchException
(ThrowableAssert.ThrowingCallable shouldRaiseException) Allows catching an instance ofException
.static IllegalArgumentException
Assertions.catchIllegalArgumentException
(ThrowableAssert.ThrowingCallable shouldRaiseIllegalArgumentException) Allows catching an instance ofIllegalArgumentException
.static IllegalArgumentException
BDDAssertions.catchIllegalArgumentException
(ThrowableAssert.ThrowingCallable shouldRaiseIllegalArgumentException) Allows catching an instance ofIllegalArgumentException
.default IllegalArgumentException
WithAssertions.catchIllegalArgumentException
(ThrowableAssert.ThrowingCallable shouldRaiseIllegalArgumentException) Allows catching an instance ofIllegalArgumentException
.static IllegalStateException
Assertions.catchIllegalStateException
(ThrowableAssert.ThrowingCallable shouldRaiseIllegalStateException) Allows catching an instance ofIllegalStateException
.static IllegalStateException
BDDAssertions.catchIllegalStateException
(ThrowableAssert.ThrowingCallable shouldRaiseIllegalStateException) Allows catching an instance ofIllegalStateException
.default IllegalStateException
WithAssertions.catchIllegalStateException
(ThrowableAssert.ThrowingCallable shouldRaiseIllegalStateException) Allows catching an instance ofIllegalStateException
.static IndexOutOfBoundsException
Assertions.catchIndexOutOfBoundsException
(ThrowableAssert.ThrowingCallable shouldRaiseIndexOutOfBoundException) Allows catching an instance ofIndexOutOfBoundsException
.static IndexOutOfBoundsException
BDDAssertions.catchIndexOutOfBoundsException
(ThrowableAssert.ThrowingCallable shouldRaiseIndexOutOfBoundException) Allows catching an instance ofIndexOutOfBoundsException
.default IndexOutOfBoundsException
WithAssertions.catchIndexOutOfBoundsException
(ThrowableAssert.ThrowingCallable shouldRaiseIndexOutOfBoundException) Allows catching an instance ofIndexOutOfBoundsException
.static IOException
Assertions.catchIOException
(ThrowableAssert.ThrowingCallable shouldRaiseIOException) Allows catching an instance ofIOException
.static IOException
BDDAssertions.catchIOException
(ThrowableAssert.ThrowingCallable shouldRaiseIOException) Allows catching an instance ofIOException
.default IOException
WithAssertions.catchIOException
(ThrowableAssert.ThrowingCallable shouldRaiseIOException) Allows catching an instance ofIOException
.static NullPointerException
Assertions.catchNullPointerException
(ThrowableAssert.ThrowingCallable shouldRaiseNullPointerException) Allows catching an instance ofNullPointerException
.static NullPointerException
BDDAssertions.catchNullPointerException
(ThrowableAssert.ThrowingCallable shouldRaiseNullPointerException) Allows catching an instance ofNullPointerException
.default NullPointerException
WithAssertions.catchNullPointerException
(ThrowableAssert.ThrowingCallable shouldRaiseNullPointerException) Allows catching an instance ofNullPointerException
.static ReflectiveOperationException
Assertions.catchReflectiveOperationException
(ThrowableAssert.ThrowingCallable shouldRaiseReflectiveOperationException) Allows catching an instance ofReflectiveOperationException
.static ReflectiveOperationException
BDDAssertions.catchReflectiveOperationException
(ThrowableAssert.ThrowingCallable shouldRaiseReflectiveOperationException) Allows catching an instance ofReflectiveOperationException
.default ReflectiveOperationException
WithAssertions.catchReflectiveOperationException
(ThrowableAssert.ThrowingCallable shouldRaiseReflectiveOperationException) Allows catching an instance ofReflectiveOperationException
.static RuntimeException
Assertions.catchRuntimeException
(ThrowableAssert.ThrowingCallable shouldRaiseRuntimeException) Allows catching an instance ofRuntimeException
.static RuntimeException
BDDAssertions.catchRuntimeException
(ThrowableAssert.ThrowingCallable shouldRaiseRuntimeException) Allows catching an instance ofRuntimeException
.default RuntimeException
WithAssertions.catchRuntimeException
(ThrowableAssert.ThrowingCallable shouldRaiseRuntimeException) Allows catching an instance ofRuntimeException
.static Throwable
Assertions.catchThrowable
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows catching aThrowable
more easily when used with Java 8 lambdas.static Throwable
AssertionsForClassTypes.catchThrowable
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows catching aThrowable
more easily when used with Java 8 lambdas.static Throwable
BDDAssertions.catchThrowable
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows catching aThrowable
more easily when used with Java 8 lambdas.static Throwable
Java6Assertions.catchThrowable
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Deprecated.Allows to catch anThrowable
more easily when used with Java 8 lambdas.static Throwable
ThrowableAssert.catchThrowable
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) default Throwable
WithAssertions.catchThrowable
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) Allows to catch anThrowable
more easily when used with Java 8 lambdas.static <THROWABLE extends Throwable>
THROWABLEAssertions.catchThrowableOfType
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type) Allows catching aThrowable
of a specific type.static <THROWABLE extends Throwable>
THROWABLEAssertionsForClassTypes.catchThrowableOfType
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type) Allows catching aThrowable
of a specific type.static <THROWABLE extends Throwable>
THROWABLEBDDAssertions.catchThrowableOfType
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type) Allows catching aThrowable
of a specific type.static <THROWABLE extends Throwable>
THROWABLEJava6Assertions.catchThrowableOfType
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type) Deprecated.Allows catching aThrowable
of a specific type.static <THROWABLE extends Throwable>
THROWABLEThrowableAssert.catchThrowableOfType
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type) default <THROWABLE extends Throwable>
THROWABLEWithAssertions.catchThrowableOfType
(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type) Allows catching aThrowable
of a specific type.static AbstractThrowableAssert<?,
? extends Throwable> BDDAssumptions.givenCode
(ThrowableAssert.ThrowingCallable lambda) Creates a new assumption's instance from a no parameters lambda expression,() -> { /* some code */ }
.void
NotThrownAssert.isThrownBy
(ThrowableAssert.ThrowingCallable code) Assert that no exception of any type is thrown by thethrowingCallable
.ThrowableTypeAssert.isThrownBy
(ThrowableAssert.ThrowingCallable throwingCallable) Assert that an exception of type T is thrown by thethrowingCallable
and allow to chain assertions on the thrown exception.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...)
.