org.apache.tools.ant.taskdefs.optional.junit

Class SummaryJUnitResultFormatter

Implemented Interfaces:
JUnitResultFormatter, TestListener, JUnitTaskMirror.JUnitResultFormatterMirror, JUnitTaskMirror.SummaryJUnitResultFormatterMirror
Known Direct Subclasses:
OutErrSummaryJUnitResultFormatter

public class SummaryJUnitResultFormatter
extends java.lang.Object
implements JUnitResultFormatter, JUnitTaskMirror.SummaryJUnitResultFormatterMirror

Prints short summary output of the test to Ant's logging system.

Constructor Summary

SummaryJUnitResultFormatter()
Empty

Method Summary

void
addError(Test test, Throwable t)
Empty
void
addFailure(Test test, AssertionFailedError t)
Interface TestListener for JUnit > 3.4.
void
addFailure(Test test, Throwable t)
Empty
void
endTest(Test test)
Empty
void
endTestSuite(JUnitTest suite)
The whole testsuite ended.
void
setOutput(OutputStream out)
.
void
setSystemError(String err)
.
void
setSystemOutput(String out)
.
void
setWithOutAndErr(boolean value)
Should the output to System.out and System.err be written to the summary.
void
startTest(Test t)
Empty
void
startTestSuite(JUnitTest suite)
The testsuite started.

Constructor Details

SummaryJUnitResultFormatter

public SummaryJUnitResultFormatter()
Empty

Method Details

addError

public void addError(Test test,
                     Throwable t)
Empty
Parameters:
test - not used.
t - not used.

addFailure

public void addFailure(Test test,
                       AssertionFailedError t)
Interface TestListener for JUnit > 3.4.

A Test failed.

Parameters:
test - not used.
t - not used.

addFailure

public void addFailure(Test test,
                       Throwable t)
Empty
Parameters:
test - not used.
t - not used.

endTest

public void endTest(Test test)
Empty
Parameters:
test - not used.

endTestSuite

public void endTestSuite(JUnitTest suite)
            throws BuildException
The whole testsuite ended.
Specified by:
endTestSuite in interface JUnitResultFormatter
Parameters:
suite - the testsuite.
Throws:
BuildException - if there is an error.

setOutput

public void setOutput(OutputStream out)
.
Specified by:
setOutput in interface JUnitResultFormatter
setOutput in interface JUnitTaskMirror.JUnitResultFormatterMirror

setSystemError

public void setSystemError(String err)
.
Specified by:
setSystemError in interface JUnitResultFormatter

setSystemOutput

public void setSystemOutput(String out)
.
Specified by:
setSystemOutput in interface JUnitResultFormatter

setWithOutAndErr

public void setWithOutAndErr(boolean value)
Should the output to System.out and System.err be written to the summary.
Specified by:
setWithOutAndErr in interface JUnitTaskMirror.SummaryJUnitResultFormatterMirror
Parameters:
value - if true write System.out and System.err to the summary.

startTest

public void startTest(Test t)
Empty
Parameters:
t - not used.

startTestSuite

public void startTestSuite(JUnitTest suite)
The testsuite started.
Specified by:
startTestSuite in interface JUnitResultFormatter
Parameters:
suite - the testsuite.