public class ResultPrinter extends java.lang.Object implements TestListener
Constructor and Description |
---|
ResultPrinter(java.io.PrintStream writer) |
Modifier and Type | Method and Description |
---|---|
void |
addError(Test test,
java.lang.Throwable t)
An error occurred.
|
void |
addFailure(Test test,
AssertionFailedError t)
A failure occurred.
|
protected java.lang.String |
elapsedTimeAsString(long runTime)
Returns the formatted string of the elapsed time.
|
void |
endTest(Test test)
A test ended.
|
java.io.PrintStream |
getWriter() |
void |
printDefect(TestFailure booBoo,
int count) |
protected void |
printDefectHeader(TestFailure booBoo,
int count) |
protected void |
printDefects(java.util.Enumeration booBoos,
int count,
java.lang.String type) |
protected void |
printDefectTrace(TestFailure booBoo) |
protected void |
printErrors(TestResult result) |
protected void |
printFailures(TestResult result) |
protected void |
printFooter(TestResult result) |
protected void |
printHeader(long runTime) |
void |
startTest(Test test)
A test started.
|
protected void printHeader(long runTime)
protected void printErrors(TestResult result)
protected void printFailures(TestResult result)
protected void printDefects(java.util.Enumeration booBoos, int count, java.lang.String type)
public void printDefect(TestFailure booBoo, int count)
protected void printDefectHeader(TestFailure booBoo, int count)
protected void printDefectTrace(TestFailure booBoo)
protected void printFooter(TestResult result)
protected java.lang.String elapsedTimeAsString(long runTime)
public java.io.PrintStream getWriter()
public void addError(Test test, java.lang.Throwable t)
TestListener
addError
in interface TestListener
TestListener.addError(Test, Throwable)
public void addFailure(Test test, AssertionFailedError t)
TestListener
addFailure
in interface TestListener
TestListener.addFailure(Test, AssertionFailedError)
public void endTest(Test test)
TestListener
endTest
in interface TestListener
TestListener.endTest(Test)
public void startTest(Test test)
TestListener
startTest
in interface TestListener
TestListener.startTest(Test)