private final class MaxHistory.RememberingListener extends RunListener
RunListener.ThreadSafe
Modifier and Type | Field and Description |
---|---|
private long |
overallStart |
private java.util.Map<Description,java.lang.Long> |
starts |
Modifier | Constructor and Description |
---|---|
private |
RememberingListener() |
Modifier and Type | Method and Description |
---|---|
void |
testFailure(Failure failure)
Called when an atomic test fails, or when a listener throws an exception.
|
void |
testFinished(Description description)
Called when an atomic test has finished, whether the test succeeds or fails.
|
void |
testRunFinished(Result result)
Called when all tests have finished.
|
void |
testStarted(Description description)
Called when an atomic test is about to be started.
|
testAssumptionFailure, testIgnored, testRunStarted, testSuiteFinished, testSuiteStarted
private long overallStart
private java.util.Map<Description,java.lang.Long> starts
public void testStarted(Description description) throws java.lang.Exception
RunListener
testStarted
in class RunListener
description
- the description of the test that is about to be run
(generally a class and method name)java.lang.Exception
public void testFinished(Description description) throws java.lang.Exception
RunListener
testFinished
in class RunListener
description
- the description of the test that just ranjava.lang.Exception
public void testFailure(Failure failure) throws java.lang.Exception
RunListener
In the case of a failure of an atomic test, this method will be called
with the same Description
passed to
RunListener.testStarted(Description)
, from the same thread that called
RunListener.testStarted(Description)
.
In the case of a listener throwing an exception, this will be called with
a Description
of Description.TEST_MECHANISM
, and may be called
on an arbitrary thread.
testFailure
in class RunListener
failure
- describes the test that failed and the exception that was thrownjava.lang.Exception
public void testRunFinished(Result result) throws java.lang.Exception
RunListener
testRunFinished
in class RunListener
result
- the summary of the test run, including all the tests that failedjava.lang.Exception