Class ClosureMediator
java.lang.Object
ch.nolix.base.testing.standardtest.ClosureMediator
A
ClosureMediator is not mutable.- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionvoidGenerates an error if the closure of the currentClosureMediatorthrows an exception.static ClosureMediatorforClosure(Runnable closure) Generates an error if the closure of the currentClosureMediatordoes not throw an exception.
-
Method Details
-
forClosure
- Parameters:
closure-- Returns:
- a new
ClosureMediatorfor the given closure. - Throws:
RuntimeException- if the given closure is null.
-
throwsException
Generates an error if the closure of the currentClosureMediatordoes not throw an exception.- Returns:
- a new
ExtendedThrownExceptionMediator.
-
doesNotThrowException
public void doesNotThrowException()Generates an error if the closure of the currentClosureMediatorthrows an exception.
-