@RunListener.ThreadSafe private class Result.Listener extends RunListener
RunListener.ThreadSafe| Modifier | Constructor and Description |
|---|---|
private |
Listener() |
| Modifier and Type | Method and Description |
|---|---|
void |
testAssumptionFailure(Failure failure)
Called when an atomic test flags that it assumes a condition that is
false
|
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 |
testIgnored(Description description)
Called when a test will not be run, generally because a test method is annotated
with
Ignore. |
void |
testRunFinished(Result result)
Called when all tests have finished.
|
void |
testRunStarted(Description description)
Called before any tests have been run.
|
testStartedpublic void testRunStarted(Description description) throws java.lang.Exception
RunListenertestRunStarted in class RunListenerdescription - describes the tests to be runjava.lang.Exceptionpublic void testRunFinished(Result result) throws java.lang.Exception
RunListenertestRunFinished in class RunListenerresult - the summary of the test run, including all the tests that failedjava.lang.Exceptionpublic void testFinished(Description description) throws java.lang.Exception
RunListenertestFinished in class RunListenerdescription - the description of the test that just ranjava.lang.Exceptionpublic void testFailure(Failure failure) throws java.lang.Exception
RunListenerIn 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 RunListenerfailure - describes the test that failed and the exception that was thrownjava.lang.Exceptionpublic void testIgnored(Description description) throws java.lang.Exception
RunListenerIgnore.testIgnored in class RunListenerdescription - describes the test that will not be runjava.lang.Exceptionpublic void testAssumptionFailure(Failure failure)
RunListenertestAssumptionFailure in class RunListenerfailure - describes the test that failed and the
AssumptionViolatedException that was thrown