|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.momeunit.ant.event.TestEventListener org.momeunit.ant.formatter.UnitResultFormatter org.momeunit.ant.formatter.TestErrorIndicator
public class TestErrorIndicator
Indicates if an error or failure occurred during tests run. Processes results
of tests run. Contains methods for querying whether an error or failure
occurred hasErrors()
and hasFailures()
; accessing last
error message getErrorMessage()
; accessing last failure message
getFailureMessage()
. Contains methods setSummary(boolean)
and setWithOutAndErr(boolean)
to specify whether to print summary
(with system error and output produced).
Field Summary |
---|
Fields inherited from class org.momeunit.ant.formatter.UnitResultFormatter |
---|
DEFAULT_ENCODING |
Constructor Summary | |
---|---|
TestErrorIndicator()
Instantiates TestErrorIndicator. |
|
TestErrorIndicator(org.apache.tools.ant.Task owner)
Instantiates TestErrorIndicator with owning task. |
|
TestErrorIndicator(org.apache.tools.ant.Task owner,
boolean summary)
Instantiates TestErrorIndicator with owning task and given printsummary functionality. |
|
TestErrorIndicator(org.apache.tools.ant.Task owner,
boolean summary,
boolean withOutAndErr)
Instantiates TestErrorIndicator with owning task and given printsummary functionality. |
Method Summary | |
---|---|
void |
addError(TestEvent event)
Callback method that indicates an error while executing test. |
void |
addFailure(TestEvent event)
Callback method that indicates test failure. |
void |
endTest(TestEvent event)
Callback method that indicates the end of test run. |
void |
endTestSuite()
Callback method that indicates the end of tests run. |
String |
getErrorMessage()
Returns last error message. |
String |
getFailureMessage()
Returns last failure message. |
boolean |
hasErrors()
Whether some test threw an error. |
boolean |
hasFailures()
Whether some test failed. |
void |
setOwner(org.apache.tools.ant.Task owner)
Sets owning task. |
void |
setSummary(boolean summary)
Sets whether to print short summary. |
void |
setWithOutAndErr(boolean withOutAndErr)
Sets whether include system output and system error produced by emulator and tests run. |
void |
startTest(TestEvent event)
Callback method that indicates the start of test run. |
Methods inherited from class org.momeunit.ant.formatter.UnitResultFormatter |
---|
filterStackTrace, getEncoding, getOutput, getSystemError, getSystemOutput, getTestSuiteName, isFilterTrace, setEncoding, setFilterTrace, setOutput, setSystemError, setSystemOutput, startTestSuite |
Methods inherited from class org.momeunit.ant.event.TestEventListener |
---|
onEvevnt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestErrorIndicator(org.apache.tools.ant.Task owner, boolean summary, boolean withOutAndErr)
owner
- owning task.summary
- whether to print short summary.withOutAndErr
- whether include system output and system error produced by
emulator and tests run.public TestErrorIndicator(org.apache.tools.ant.Task owner, boolean summary)
owner
- owning task.summary
- whether to print short summary.public TestErrorIndicator(org.apache.tools.ant.Task owner)
owner
- owning task.public TestErrorIndicator()
Method Detail |
---|
public void setSummary(boolean summary)
summary
- boolean that indicates whether to print short summary.public void setOwner(org.apache.tools.ant.Task owner)
owner
- owning task.public void setWithOutAndErr(boolean withOutAndErr)
withOutAndErr
- boolean that indicates whether include system output and system
error produced by emulator and tests run.public void addError(TestEvent event)
TestEventListener
addError
in class TestEventListener
event
- test event of error while executing test.public void addFailure(TestEvent event)
TestEventListener
addFailure
in class TestEventListener
event
- test event of test failure.public void endTest(TestEvent event)
TestEventListener
endTest
in class TestEventListener
event
- test event of end of test run.public void startTest(TestEvent event)
TestEventListener
startTest
in class TestEventListener
event
- test event of start of test run.public String getErrorMessage()
public String getFailureMessage()
public boolean hasErrors()
true
if some test threw an error, false
otherwise.public boolean hasFailures()
true
if some test failed, false
otherwise.public void endTestSuite()
UnitResultFormatter
endTestSuite
in class UnitResultFormatter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |