public class ResultPrinter extends Object implements TestListener
| Constructor and Description |
|---|
ResultPrinter(PrintStream writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addError(Test test,
Throwable e)
An error occurred.
|
void |
addFailure(Test test,
AssertionFailedError t)
A failure occurred.
|
protected String |
elapsedTimeAsString(long runTime)
Returns the formatted string of the elapsed time.
|
void |
endTest(Test test)
A test ended.
|
PrintStream |
getWriter() |
void |
printDefect(TestFailure booBoo,
int count) |
protected void |
printDefectHeader(TestFailure booBoo,
int count) |
protected void |
printDefects(Enumeration<TestFailure> booBoos,
int count,
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.
|
public ResultPrinter(PrintStream writer)
protected void printHeader(long runTime)
protected void printErrors(TestResult result)
protected void printFailures(TestResult result)
protected void printDefects(Enumeration<TestFailure> booBoos, int count, 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 String elapsedTimeAsString(long runTime)
public PrintStream getWriter()
public void addError(Test test, Throwable e)
TestListeneraddError in interface TestListenerTestListener.addError(Test, Throwable)public void addFailure(Test test, AssertionFailedError t)
TestListeneraddFailure in interface TestListenerTestListener.addFailure(Test, AssertionFailedError)public void endTest(Test test)
TestListenerendTest in interface TestListenerTestListener.endTest(Test)public void startTest(Test test)
TestListenerstartTest in interface TestListenerTestListener.startTest(Test)Copyright © 2002–2020 JUnit. All rights reserved.