org.apache.tools.ant.taskdefs.optional.junit
public class BriefJUnitResultFormatter extends java.lang.Object implements JUnitResultFormatter
FormatterElement
,
PlainJUnitResultFormatter
Constructor and Description |
---|
BriefJUnitResultFormatter()
Constructor for BriefJUnitResultFormatter.
|
Modifier and Type | Method and Description |
---|---|
void |
addError(Test test,
java.lang.Throwable error)
A test caused an error.
|
void |
addFailure(Test test,
AssertionFailedError t)
Interface TestListener for JUnit > 3.4.
|
void |
addFailure(Test test,
java.lang.Throwable t)
Interface TestListener for JUnit <= 3.4.
|
void |
endTest(Test test)
A test ended.
|
void |
endTestSuite(JUnitTest suite)
The whole testsuite ended.
|
protected void |
formatError(java.lang.String type,
Test test,
java.lang.Throwable error)
Format an error and print it.
|
protected java.lang.String |
formatTest(Test test)
Format the test for printing..
|
void |
setOutput(java.io.OutputStream out)
Sets the stream the formatter is supposed to write its results to.
|
void |
setSystemError(java.lang.String err)
This is what the test has written to System.err
|
void |
setSystemOutput(java.lang.String out)
This is what the test has written to System.out
|
void |
startTest(Test test)
A test started.
|
void |
startTestSuite(JUnitTest suite)
The whole testsuite started.
|
public BriefJUnitResultFormatter()
public void setOutput(java.io.OutputStream out)
setOutput
in interface JUnitResultFormatter
setOutput
in interface JUnitTaskMirror.JUnitResultFormatterMirror
out
- the output stream to write topublic void setSystemOutput(java.lang.String out)
setSystemOutput
in interface JUnitResultFormatter
out
- the string to write.public void setSystemError(java.lang.String err)
setSystemError
in interface JUnitResultFormatter
err
- the string to write.public void startTestSuite(JUnitTest suite)
startTestSuite
in interface JUnitResultFormatter
suite
- the test suitepublic void endTestSuite(JUnitTest suite)
endTestSuite
in interface JUnitResultFormatter
suite
- the test suitepublic void startTest(Test test)
test
- a testpublic void endTest(Test test)
test
- a testpublic void addFailure(Test test, java.lang.Throwable t)
A Test failed.
test
- a testt
- the exception thrown by the testpublic void addFailure(Test test, AssertionFailedError t)
A Test failed.
test
- a testt
- the assertion failed by the testpublic void addError(Test test, java.lang.Throwable error)
test
- a testerror
- the error thrown by the testprotected java.lang.String formatTest(Test test)
test
- a testprotected void formatError(java.lang.String type, Test test, java.lang.Throwable error)
type
- the type of errortest
- the test that failederror
- the exception that the test threw