public class TextListener extends RunListener
RunListener.ThreadSafe| Modifier and Type | Field and Description |
|---|---|
private java.io.PrintStream |
writer |
| Constructor and Description |
|---|
TextListener(JUnitSystem system) |
TextListener(java.io.PrintStream writer) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
elapsedTimeAsString(long runTime)
Returns the formatted string of the elapsed time.
|
private java.io.PrintStream |
getWriter() |
protected void |
printFailure(Failure each,
java.lang.String prefix) |
protected void |
printFailures(Result result) |
protected void |
printFooter(Result result) |
protected void |
printHeader(long runTime) |
void |
testFailure(Failure failure)
Called when an atomic test fails, or when a listener throws an exception.
|
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 |
testStarted(Description description)
Called when an atomic test is about to be started.
|
testAssumptionFailure, testFinished, testRunStartedpublic TextListener(JUnitSystem system)
public TextListener(java.io.PrintStream writer)
public void testRunFinished(Result result)
RunListenertestRunFinished in class RunListenerresult - the summary of the test run, including all the tests that failedpublic void testStarted(Description description)
RunListenertestStarted in class RunListenerdescription - the description of the test that is about to be run
(generally a class and method name)public void testFailure(Failure failure)
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 thrownpublic void testIgnored(Description description)
RunListenerIgnore.testIgnored in class RunListenerdescription - describes the test that will not be runprivate java.io.PrintStream getWriter()
protected void printHeader(long runTime)
protected void printFailures(Result result)
protected void printFailure(Failure each, java.lang.String prefix)
protected void printFooter(Result result)
protected java.lang.String elapsedTimeAsString(long runTime)