Package org.junit.experimental.max
Class MaxHistory.RememberingListener
- java.lang.Object
-
- org.junit.runner.notification.RunListener
-
- org.junit.experimental.max.MaxHistory.RememberingListener
-
- Enclosing class:
- MaxHistory
private final class MaxHistory.RememberingListener extends RunListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
RunListener.ThreadSafe
-
-
Field Summary
Fields Modifier and Type Field Description private longoverallStartprivate java.util.Map<Description,java.lang.Long>starts
-
Constructor Summary
Constructors Modifier Constructor Description privateRememberingListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestFailure(Failure failure)Called when an atomic test fails, or when a listener throws an exception.voidtestFinished(Description description)Called when an atomic test has finished, whether the test succeeds or fails.voidtestRunFinished(Result result)Called when all tests have finished.voidtestStarted(Description description)Called when an atomic test is about to be started.-
Methods inherited from class org.junit.runner.notification.RunListener
testAssumptionFailure, testIgnored, testRunStarted, testSuiteFinished, testSuiteStarted
-
-
-
-
Field Detail
-
overallStart
private long overallStart
-
starts
private java.util.Map<Description,java.lang.Long> starts
-
-
Method Detail
-
testStarted
public void testStarted(Description description) throws java.lang.Exception
Description copied from class:RunListenerCalled when an atomic test is about to be started.- Overrides:
testStartedin classRunListener- Parameters:
description- the description of the test that is about to be run (generally a class and method name)- Throws:
java.lang.Exception
-
testFinished
public void testFinished(Description description) throws java.lang.Exception
Description copied from class:RunListenerCalled when an atomic test has finished, whether the test succeeds or fails.- Overrides:
testFinishedin classRunListener- Parameters:
description- the description of the test that just ran- Throws:
java.lang.Exception
-
testFailure
public void testFailure(Failure failure) throws java.lang.Exception
Description copied from class:RunListenerCalled when an atomic test fails, or when a listener throws an exception.In the case of a failure of an atomic test, this method will be called with the same
Descriptionpassed toRunListener.testStarted(Description), from the same thread that calledRunListener.testStarted(Description).In the case of a listener throwing an exception, this will be called with a
DescriptionofDescription.TEST_MECHANISM, and may be called on an arbitrary thread.- Overrides:
testFailurein classRunListener- Parameters:
failure- describes the test that failed and the exception that was thrown- Throws:
java.lang.Exception
-
testRunFinished
public void testRunFinished(Result result) throws java.lang.Exception
Description copied from class:RunListenerCalled when all tests have finished. This may be called on an arbitrary thread.- Overrides:
testRunFinishedin classRunListener- Parameters:
result- the summary of the test run, including all the tests that failed- Throws:
java.lang.Exception
-
-