Class ExceptionWithWrongTypeThrownFailure
java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
com.github.stefanbirkner.fishbowl.ExceptionWithWrongTypeThrownFailure
- All Implemented Interfaces:
Serializable
This exception is thrown by
Fishbowl.exceptionThrownBy(Statement, java.lang.Class)
if the provided Statement
did throw an exception that does not have the specified type. It
extends AssertionError in order to trigger a test
failure.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExceptionWithWrongTypeThrownFailure(Class<? extends Throwable> expectedType, Throwable thrownException) Creates a newExceptionWithWrongTypeThrownFailure. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the expected exception.Returns the exception that has been thrown.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
expectedType
-
-
Constructor Details
-
ExceptionWithWrongTypeThrownFailure
-
-
Method Details
-
getExpectedType
-
getThrownException
Returns the exception that has been thrown.- Returns:
- the exception that has been thrown.
-