Package org.assertj.core.api
Class WithThrowable
- java.lang.Object
-
- org.assertj.core.api.WithThrowable
-
public class WithThrowable extends Object
-
-
Constructor Summary
Constructors Constructor Description WithThrowable(Throwable exception)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowableAssertAlternative<?>withThrowableOfType(Class<? extends Throwable> type)Checks that the underlying throwable is of the given type and returns aThrowableAssertAlternativeto chain further assertions on the underlying throwable.
-
-
-
Field Detail
-
throwable
private final Throwable throwable
-
-
Constructor Detail
-
WithThrowable
WithThrowable(Throwable exception)
-
-
Method Detail
-
withThrowableOfType
public ThrowableAssertAlternative<?> withThrowableOfType(Class<? extends Throwable> type)
Checks that the underlying throwable is of the given type and returns aThrowableAssertAlternativeto chain further assertions on the underlying throwable.- Parameters:
type- the expectedThrowabletype- Returns:
- a
ThrowableAssertAlternativebuilt with underlying throwable.
-
-