org.apache.tools.ant.taskdefs.optional.junit
Class BriefJUnitResultFormatter
java.lang.Object
org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter
- JUnitResultFormatter, TestListener
public class BriefJUnitResultFormatter
extends java.lang.Object
Prints plain text output of the test to a specified Writer.
Inspired by the PlainJUnitResultFormatter.
void | addError(Test test, Throwable error) - A test caused an error.
|
void | addFailure(Test test, AssertionFailedError t) - Interface TestListener for JUnit > 3.4.
|
void | addFailure(Test test, 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(String type, Test test, Throwable error) - Format an error and print it.
|
protected String | formatTest(Test test) - Format the test for printing..
|
void | setOutput(OutputStream out) - Sets the stream the formatter is supposed to write its results to.
|
void | setSystemError(String err)
|
void | setSystemOutput(String out)
|
void | startTest(Test test) - A test started.
|
void | startTestSuite(JUnitTest suite) - The whole testsuite started.
|
BriefJUnitResultFormatter
public BriefJUnitResultFormatter()
Constructor for BriefJUnitResultFormatter.
addError
public void addError(Test test,
Throwable error)
A test caused an error.
test
- a testerror
- the error thrown by the test
addFailure
public void addFailure(Test test,
AssertionFailedError t)
Interface TestListener for JUnit > 3.4.
A Test failed.
test
- a testt
- the assertion failed by the test
addFailure
public void addFailure(Test test,
Throwable t)
Interface TestListener for JUnit <= 3.4.
A Test failed.
test
- a testt
- the exception thrown by the test
endTest
public void endTest(Test test)
A test ended.
formatError
protected void formatError(String type,
Test test,
Throwable error)
Format an error and print it.
type
- the type of errortest
- the test that failederror
- the exception that the test threw
formatTest
protected String formatTest(Test test)
Format the test for printing..
setOutput
public void setOutput(OutputStream out)
Sets the stream the formatter is supposed to write its results to.
- setOutput in interface JUnitResultFormatter
out
- the output stream to write to
startTest
public void startTest(Test test)
A test started.
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.