|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmomeunit.framework.TestResult
public class TestResult
A class that collects the results of execution of tests.
Test,
TestCase,
TestSuite| Field Summary | |
|---|---|
protected Vector |
errors
Collection of exceptions (except AssertionFailedError thrown while
executing tests. |
protected Vector |
failures
Collection of tests failures. |
protected TestListener |
listener
Registered test listener. |
protected int |
runTests
Number of tests run. |
| Constructor Summary | |
|---|---|
TestResult()
Instantiates TestResult. |
|
| Method Summary | |
|---|---|
void |
addError(Test test,
Throwable t)
Adds a Throwable thrown while executing test to the list of errors. |
void |
addFailure(Test test,
AssertionFailedError t)
Adds a failure of test to the list of failures. |
void |
endTest(Test test)
Informs the result that a test was completed. |
int |
errorCount()
Returns the number of detected errors. |
Enumeration |
errors()
Returns Enumeration of detected errors. |
int |
failureCount()
Returns the number of detected failures. |
Enumeration |
failures()
Returns an Enumeration of detected failures. |
protected void |
run(TestCase test)
Runs specified TestCase. |
int |
runCount()
Returns the number of tests run. |
void |
setListener(TestListener listener)
Registers a TestListener with this TestResult. |
boolean |
shouldStop()
Checks whether the test run should stop. |
void |
startTest(Test test)
Informs the result that a test will be started. |
void |
stop()
Notifies that the test run should stop. |
boolean |
wasSuccessful()
Checks whether the entire test was successful or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Vector failures
protected Vector errors
AssertionFailedError thrown while
executing tests.
protected TestListener listener
protected int runTests
| Constructor Detail |
|---|
public TestResult()
| Method Detail |
|---|
public void addError(Test test,
Throwable t)
Throwable thrown while executing test to the list of errors.
test - test that throws specified Throwable.t - Throwable to be added to the list of errors.
public void addFailure(Test test,
AssertionFailedError t)
test - test that fails.t - AssertionFailedError thrown from failed assertion.public void setListener(TestListener listener)
listener - TestListener instance to be registered with this TestResult.public void endTest(Test test)
test - test that ends.public int errorCount()
public Enumeration errors()
public int failureCount()
public Enumeration failures()
protected void run(TestCase test)
test - TestCase instance to be run.public int runCount()
public boolean shouldStop()
public void startTest(Test test)
test - test to be run.public void stop()
public boolean wasSuccessful()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||