Class BeforeAfterRunListenerDecorator
java.lang.Object
org.junit.runner.notification.RunListener
com.carrotsearch.ant.tasks.junit4.slave.BeforeAfterRunListenerDecorator
- Direct Known Subclasses:
StreamFlusherDecorator
public abstract class BeforeAfterRunListenerDecorator
extends org.junit.runner.notification.RunListener
RunListener
decorator that does something before and after a given method call.
A fancier impl. could use a Proxy
but RunListener
is not an interface.-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
org.junit.runner.notification.RunListener.ThreadSafe
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.junit.runner.notification.RunListener
-
Constructor Summary
ConstructorsConstructorDescriptionBeforeAfterRunListenerDecorator
(org.junit.runner.notification.RunListener delegate) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
after()
protected void
before()
final void
testAssumptionFailure
(org.junit.runner.notification.Failure failure) final void
testFailure
(org.junit.runner.notification.Failure failure) final void
testFinished
(org.junit.runner.Description description) final void
testIgnored
(org.junit.runner.Description description) final void
testRunFinished
(org.junit.runner.Result result) final void
testRunStarted
(org.junit.runner.Description description) final void
testStarted
(org.junit.runner.Description description) Methods inherited from class org.junit.runner.notification.RunListener
testSuiteFinished, testSuiteStarted
-
Field Details
-
delegate
private final org.junit.runner.notification.RunListener delegate
-
-
Constructor Details
-
BeforeAfterRunListenerDecorator
public BeforeAfterRunListenerDecorator(org.junit.runner.notification.RunListener delegate)
-
-
Method Details
-
testRunStarted
- Overrides:
testRunStarted
in classorg.junit.runner.notification.RunListener
- Throws:
Exception
-
testRunFinished
- Overrides:
testRunFinished
in classorg.junit.runner.notification.RunListener
- Throws:
Exception
-
testStarted
- Overrides:
testStarted
in classorg.junit.runner.notification.RunListener
- Throws:
Exception
-
testFinished
- Overrides:
testFinished
in classorg.junit.runner.notification.RunListener
- Throws:
Exception
-
testFailure
- Overrides:
testFailure
in classorg.junit.runner.notification.RunListener
- Throws:
Exception
-
testAssumptionFailure
public final void testAssumptionFailure(org.junit.runner.notification.Failure failure) - Overrides:
testAssumptionFailure
in classorg.junit.runner.notification.RunListener
-
testIgnored
- Overrides:
testIgnored
in classorg.junit.runner.notification.RunListener
- Throws:
Exception
-
after
protected void after() -
before
protected void before()
-