|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter
public class BriefJUnitResultFormatter
Prints plain text output of the test to a specified Writer. Inspired by the PlainJUnitResultFormatter.
FormatterElement,
PlainJUnitResultFormatter| Constructor Summary | |
|---|---|
BriefJUnitResultFormatter()
Constructor for BriefJUnitResultFormatter. |
|
| Method Summary | |
|---|---|
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. |
void |
formatSkip(Test test,
java.lang.String message)
|
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. |
void |
testAssumptionFailure(Test test,
java.lang.Throwable cause)
Receive a report that a test has failed an assumption. |
void |
testIgnored(Test test)
Reports when a test has been marked with the @Ignore annotation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BriefJUnitResultFormatter()
| Method Detail |
|---|
public void setOutput(java.io.OutputStream out)
setOutput in interface JUnitResultFormattersetOutput in interface JUnitTaskMirror.JUnitResultFormatterMirrorout - the output stream to write topublic void setSystemOutput(java.lang.String out)
setSystemOutput in interface JUnitResultFormatterout - the string to write.public void setSystemError(java.lang.String err)
setSystemError in interface JUnitResultFormattererr - the string to write.public void startTestSuite(JUnitTest suite)
startTestSuite in interface JUnitResultFormattersuite - the test suitepublic void endTestSuite(JUnitTest suite)
endTestSuite in interface JUnitResultFormattersuite - the test suitepublic void startTest(Test test)
test - a testpublic void endTest(Test test)
test - a test
public void addFailure(Test test,
java.lang.Throwable t)
A Test failed.
test - a testt - the exception thrown by the test
public void addFailure(Test test,
AssertionFailedError t)
A Test failed.
test - a testt - the assertion failed by the test
public 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 test
protected 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 threwpublic void testIgnored(Test test)
IgnoredTestListenerjunit.framework.JUnit4TestCaseFacade
so implementing classes should be able to get the details of the ignore by casting
the argument and retrieving the descriptor from the test.
testIgnored in interface IgnoredTestListenertest - the details of the test and failure that have triggered this report.
public void formatSkip(Test test,
java.lang.String message)
public void testAssumptionFailure(Test test,
java.lang.Throwable cause)
IgnoredTestListener
testAssumptionFailure in interface IgnoredTestListenertest - the details of the test and failure that have triggered this report.cause - the AssumptionViolatedException thrown from the current assumption failure.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||