Class ExtendedThrownExceptionMediator
java.lang.Object
ch.nolix.base.testing.standardtest.AbstractThrownExceptionMediator
ch.nolix.base.testing.standardtest.ExtendedThrownExceptionMediator
A
ExtendedThrownExceptionMediator is not mutable.- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionforExcetpion(Throwable exception) <E extends Exception>
ThrownExceptionMediatorGenerates an error if the exception of the currentThrownExceptionMediatoris not of the given type.Methods inherited from class AbstractThrownExceptionMediator
withMessage, withMessage, withMessageThatMatches, withoutMessage
-
Method Details
-
forExcetpion
- Parameters:
exception-- Returns:
- a new
ExtendedThrownExceptionMediatorfor the given exception. - Throws:
RuntimeException- if the given exception is null.
-
ofType
Generates an error if the exception of the currentThrownExceptionMediatoris not of the given type.- Type Parameters:
E- is the givenExceptiontype.- Parameters:
type-- Returns:
- a new
ThrownExceptionMediatorthat belongs to the test of the currentThrownExceptionMediatorand is for the exception of the currentThrownExceptionMediator. - Throws:
RuntimeException- if the given type is null.
-