⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
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

ResultPrinter(PrintStream writer)

Method Summary

void

addError(Test test, Throwable t)

void

addFailure(Test test, AssertionFailedError t)

String

elapsedTimeAsString(long runTime)

Returns the formatted string of the elapsed time.

void

endTest(Test test)

PrintStream

getWriter()

void

printDefect(TestFailure booBoo, int count)

void

printDefectHeader(TestFailure booBoo, int count)

void

printDefectTrace(TestFailure booBoo)

void

printDefects(Enumeration booBoos, int count, String type)

void

printErrors(TestResult result)

void

printFailures(TestResult result)

void

printFooter(TestResult result)

void

printHeader(long runTime)

void

startTest(Test test)

Constructor Details

ResultPrinter

public ResultPrinter(PrintStream writer)

Parameters:
writer

Method Details

addError

public void addError(Test test, Throwable t)

Parameters:
test
t
See Also:
junit.framework.TestListener.addError(Test,Throwable)

addFailure

public void addFailure(Test test, AssertionFailedError t)

Parameters:
test
t
See Also:
junit.framework.TestListener.addFailure(Test,AssertionFailedError)

elapsedTimeAsString

protected String elapsedTimeAsString(long runTime)

Returns the formatted string of the elapsed time. Duplicated from BaseTestRunner. Fix it.

Parameters:
runTime

endTest

public void endTest(Test test)

Parameters:
test
See Also:
junit.framework.TestListener.endTest(Test)

getWriter

public PrintStream getWriter()


printDefect

public void printDefect(TestFailure booBoo, int count)

Parameters:
booBoo
count

printDefectHeader

protected void printDefectHeader(TestFailure booBoo, int count)

Parameters:
booBoo
count

printDefectTrace

protected void printDefectTrace(TestFailure booBoo)

Parameters:
booBoo

printDefects

protected void printDefects(Enumeration booBoos, int count, String type)

Parameters:
booBoos
count
type

printErrors

protected void printErrors(TestResult result)

Parameters:
result

printFailures

protected void printFailures(TestResult result)

Parameters:
result

printFooter

protected void printFooter(TestResult result)

Parameters:
result

printHeader

protected void printHeader(long runTime)

Parameters:
runTime

startTest

public void startTest(Test test)

Parameters:
test
See Also:
junit.framework.TestListener.startTest(Test)