Klasse ThrownExceptionMediator
java.lang.Object
ch.nolix.core.testing.standardtest.ThrownExceptionMediator
- Bekannte direkte Unterklassen:
ExtendedThrownExceptionMediator
A
ThrownExceptionMediator is not mutable.
A ThrownExceptionMediator does not need to have an exception. In the
case an exception was expected, but not thrown, a
ThrownExceptionMediator must be created, but an exception cannot be
given to it.- Version:
- 2018-12-09
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal voidGenerates an error if the exception of the currentThrownExceptionMediatordoes not have a message.final voidwithMessage(String message) Generates an error if the exception of the currentThrownExceptionMediatordoes not have the given message.final voidwithMessageThatMatches(String regex) Generates an error if the exception of the currentThrownExceptionMediatordoes not have a message that matches the given regexfinal voidGenerates an error if the exception of the currentThrownExceptionMediatorhas a message.
-
Methodendetails
-
withMessage
public final void withMessage()Generates an error if the exception of the currentThrownExceptionMediatordoes not have a message. -
withMessage
Generates an error if the exception of the currentThrownExceptionMediatordoes not have the given message.- Parameter:
message-- Löst aus:
ArgumentIsNullException- if the given message is null.
-
withMessageThatMatches
Generates an error if the exception of the currentThrownExceptionMediatordoes not have a message that matches the given regex- Parameter:
regex-- Löst aus:
ArgumentIsNullException- if the given regex is null.
-
withoutMessage
public final void withoutMessage()Generates an error if the exception of the currentThrownExceptionMediatorhas a message.
-