public class TextRunListener extends Object implements MxRunListener
Modifier and Type | Field and Description |
---|---|
private PrintStream |
fWriter |
protected org.junit.runner.notification.Failure |
lastFailure |
Constructor and Description |
---|
TextRunListener(org.junit.internal.JUnitSystem system) |
TextRunListener(PrintStream writer) |
Modifier and Type | Method and Description |
---|---|
static org.junit.runner.notification.RunListener |
createRunListener(MxRunListener l) |
org.junit.runner.notification.Failure |
getLastFailure() |
PrintStream |
getWriter() |
void |
testAssumptionFailure(org.junit.runner.notification.Failure failure)
Called when an atomic test flags that it assumes a condition that is false.
|
void |
testClassFinished(Class<?> clazz)
Called when all tests of a test class have finished.
|
void |
testClassFinishedDelimiter()
Called after
MxRunListener.testClassFinished(Class) . |
void |
testClassStarted(Class<?> clazz)
Called when a test class is about to be started.
|
void |
testClassStartedDelimiter()
Called after
MxRunListener.testClassStarted(Class) . |
void |
testFailed(org.junit.runner.notification.Failure failure)
Called when an atomic test fails.
|
void |
testFinished(org.junit.runner.Description description)
Called when an atomic test has finished, whether the test succeeds, fails or is ignored.
|
void |
testFinishedDelimiter()
Called after
MxRunListener.testFailed(Failure) . |
void |
testIgnored(org.junit.runner.Description description)
Called when a test will not be run, generally because a test method is annotated with
Ignore . |
void |
testRunFinished(org.junit.runner.Result result)
Called when all tests have finished.
|
void |
testRunStarted(org.junit.runner.Description description)
Called before any tests have been run.
|
void |
testStarted(org.junit.runner.Description description)
Called when an atomic test is about to be started.
|
void |
testStartedDelimiter()
Called after
MxRunListener.testStarted(Description) . |
void |
testSucceeded(org.junit.runner.Description description)
Called when an atomic test succeeds.
|
private final PrintStream fWriter
protected org.junit.runner.notification.Failure lastFailure
public TextRunListener(org.junit.internal.JUnitSystem system)
public TextRunListener(PrintStream writer)
public PrintStream getWriter()
getWriter
in interface MxRunListener
public org.junit.runner.notification.Failure getLastFailure()
public void testRunStarted(org.junit.runner.Description description)
MxRunListener
testRunStarted
in interface MxRunListener
description
- describes the tests to be runpublic void testRunFinished(org.junit.runner.Result result)
MxRunListener
testRunFinished
in interface MxRunListener
result
- the summary of the test run, including all the tests that failedpublic void testAssumptionFailure(org.junit.runner.notification.Failure failure)
MxRunListener
testAssumptionFailure
in interface MxRunListener
failure
- describes the test that failed and the AssumptionViolatedException
that was thrownpublic void testClassStarted(Class<?> clazz)
MxRunListener
testClassStarted
in interface MxRunListener
clazz
- the test classpublic void testClassFinished(Class<?> clazz)
MxRunListener
testClassFinished
in interface MxRunListener
clazz
- the test classpublic void testStarted(org.junit.runner.Description description)
MxRunListener
testStarted
in interface MxRunListener
description
- the description of the test that is about to be run (generally a class and
method name)public void testFinished(org.junit.runner.Description description)
MxRunListener
testFinished
in interface MxRunListener
description
- the description of the test that just ranpublic void testFailed(org.junit.runner.notification.Failure failure)
MxRunListener
testFailed
in interface MxRunListener
failure
- describes the test that failed and the exception that was thrownpublic void testSucceeded(org.junit.runner.Description description)
MxRunListener
testSucceeded
in interface MxRunListener
description
- describes the test that will not be runpublic void testIgnored(org.junit.runner.Description description)
MxRunListener
Ignore
.testIgnored
in interface MxRunListener
description
- describes the test that will not be runpublic void testClassFinishedDelimiter()
MxRunListener
MxRunListener.testClassFinished(Class)
.testClassFinishedDelimiter
in interface MxRunListener
public void testClassStartedDelimiter()
MxRunListener
MxRunListener.testClassStarted(Class)
.testClassStartedDelimiter
in interface MxRunListener
public void testStartedDelimiter()
MxRunListener
MxRunListener.testStarted(Description)
.testStartedDelimiter
in interface MxRunListener
public void testFinishedDelimiter()
MxRunListener
MxRunListener.testFailed(Failure)
.testFinishedDelimiter
in interface MxRunListener
public static org.junit.runner.notification.RunListener createRunListener(MxRunListener l)