public class TextListener extends RunListener
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.
|
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.
|
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, testRunStarted
public TextListener(JUnitSystem system)
public TextListener(java.io.PrintStream writer)
public void testRunFinished(Result result)
RunListener
testRunFinished
in class RunListener
result
- the summary of the test run, including all the tests that failedpublic void testStarted(Description description)
RunListener
testStarted
in class RunListener
description
- the description of the test that is about to be run
(generally a class and method name)public void testFailure(Failure failure)
RunListener
testFailure
in class RunListener
failure
- describes the test that failed and the exception that was thrownpublic void testIgnored(Description description)
RunListener
Ignore
.testIgnored
in class RunListener
description
- describes the test that will not be runprotected 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)