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 void
Generates an error if the exception of the currentThrownExceptionMediator
does not have a message.final void
withMessage
(String message) Generates an error if the exception of the currentThrownExceptionMediator
does not have the given message.final void
withMessageThatMatches
(String regex) Generates an error if the exception of the currentThrownExceptionMediator
does not have a message that matches the given regexfinal void
Generates an error if the exception of the currentThrownExceptionMediator
has a message.
-
Methodendetails
-
withMessage
public final void withMessage()Generates an error if the exception of the currentThrownExceptionMediator
does not have a message. -
withMessage
Generates an error if the exception of the currentThrownExceptionMediator
does 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 currentThrownExceptionMediator
does 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 currentThrownExceptionMediator
has a message.
-