Package org.assertj.core.api
Class WithThrowable
java.lang.Object
org.assertj.core.api.WithThrowable
-
Method Summary
Modifier and TypeMethodDescriptionwithThrowableOfType
(Class<? extends Throwable> type) Checks that the underlying throwable is of the given type and returns aThrowableAssertAlternative
to chain further assertions on the underlying throwable.Returns aThrowableAssertAlternative
to chain assertions on the underlying throwable.
-
Method Details
-
withThrowableOfType
Checks that the underlying throwable is of the given type and returns aThrowableAssertAlternative
to chain further assertions on the underlying throwable.Equivalent to
withThrowableThat().isInstanceOf(type)
- Parameters:
type
- the expectedThrowable
type- Returns:
- a
ThrowableAssertAlternative
built with underlying throwable.
-
withThrowableThat
Returns aThrowableAssertAlternative
to chain assertions on the underlying throwable.- Returns:
- a
ThrowableAssertAlternative
built with underlying throwable.
-