Package org.assertj.core.api
Class WithThrowable
java.lang.Object
org.assertj.core.api.WithThrowable
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.
-
Field Details
-
throwable
-
-
Constructor Details
-
WithThrowable
WithThrowable(Throwable exception)
-
-
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.
-