Package junit.textui
Class ResultPrinter
- java.lang.Object
-
- junit.textui.ResultPrinter
-
- All Implemented Interfaces:
TestListener
public class ResultPrinter extends java.lang.Object implements TestListener
-
-
Constructor Summary
Constructors Constructor Description ResultPrinter(java.io.PrintStream writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddError(Test test, java.lang.Throwable e)An error occurred.voidaddFailure(Test test, AssertionFailedError t)A failure occurred.protected java.lang.StringelapsedTimeAsString(long runTime)Returns the formatted string of the elapsed time.voidendTest(Test test)A test ended.java.io.PrintStreamgetWriter()voidprintDefect(TestFailure booBoo, int count)protected voidprintDefectHeader(TestFailure booBoo, int count)protected voidprintDefects(java.util.Enumeration<TestFailure> booBoos, int count, java.lang.String type)protected voidprintDefectTrace(TestFailure booBoo)protected voidprintErrors(TestResult result)protected voidprintFailures(TestResult result)protected voidprintFooter(TestResult result)protected voidprintHeader(long runTime)voidstartTest(Test test)A test started.
-
-
-
Method Detail
-
printHeader
protected void printHeader(long runTime)
-
printErrors
protected void printErrors(TestResult result)
-
printFailures
protected void printFailures(TestResult result)
-
printDefects
protected void printDefects(java.util.Enumeration<TestFailure> booBoos, int count, java.lang.String type)
-
printDefect
public void printDefect(TestFailure booBoo, int count)
-
printDefectHeader
protected void printDefectHeader(TestFailure booBoo, int count)
-
printDefectTrace
protected void printDefectTrace(TestFailure booBoo)
-
printFooter
protected void printFooter(TestResult result)
-
elapsedTimeAsString
protected java.lang.String elapsedTimeAsString(long runTime)
Returns the formatted string of the elapsed time. Duplicated from BaseTestRunner. Fix it.
-
getWriter
public java.io.PrintStream getWriter()
-
addError
public void addError(Test test, java.lang.Throwable e)
Description copied from interface:TestListenerAn error occurred.- Specified by:
addErrorin interfaceTestListener- See Also:
TestListener.addError(Test, Throwable)
-
addFailure
public void addFailure(Test test, AssertionFailedError t)
Description copied from interface:TestListenerA failure occurred.- Specified by:
addFailurein interfaceTestListener- See Also:
TestListener.addFailure(Test, AssertionFailedError)
-
endTest
public void endTest(Test test)
Description copied from interface:TestListenerA test ended.- Specified by:
endTestin interfaceTestListener- See Also:
TestListener.endTest(Test)
-
startTest
public void startTest(Test test)
Description copied from interface:TestListenerA test started.- Specified by:
startTestin interfaceTestListener- See Also:
TestListener.startTest(Test)
-
-