Object | +--junit.framework.TestResult
Test
Vector | |
Vector | A TestResult collects the results of executing a test case. |
Vector | |
int |
synchronized void | addError(Test test, Throwable t) Adds an error to the list of errors. |
synchronized void | addFailure(Test test, AssertionFailedError t) Adds a failure to the list of failures. |
synchronized void | addListener(TestListener listener) Registers a TestListener |
void | Informs the result that a test was completed. |
synchronized int | Gets the number of detected errors. |
synchronized Enumeration | errors() Returns an Enumeration for the errors |
synchronized int | Gets the number of detected failures. |
synchronized Enumeration | failures() Returns an Enumeration for the failures |
synchronized void | removeListener(TestListener listener) Unregisters a TestListener |
void | run(final TestCase test) Runs a TestCase. |
synchronized int | runCount() Gets the number of run tests. |
void | runProtected(final Test test, Protectable p) Runs a TestCase. |
synchronized boolean | Checks whether the test run should stop |
void | Informs the result that a test will be started. |
synchronized void | stop() Marks that the test run should stop. |
synchronized boolean | Returns whether the entire test was successful or not. |
protected Vector fErrors
protected Vector fFailures
TestResult
collects the results of executing
a test case. It is an instance of the Collecting Parameter pattern.
The test framework distinguishes between failures and errors.
A failure is anticipated and checked for with assertions. Errors are
unanticipated problems like an ArrayIndexOutOfBoundsException
.
Test
protected Vector fListeners
protected int fRunTests
public TestResult()
public synchronized void addError(Test test, Throwable t)
public synchronized void addFailure(Test test, AssertionFailedError t)
public synchronized void addListener(TestListener listener)
public void endTest(Test test)
public synchronized int errorCount()
public synchronized Enumeration errors()
public synchronized int failureCount()
public synchronized Enumeration failures()
public synchronized void removeListener(TestListener listener)
protected void run(final TestCase test)
public synchronized int runCount()
public void runProtected(final Test test, Protectable p)
public synchronized boolean shouldStop()
public void startTest(Test test)
public synchronized void stop()
public synchronized boolean wasSuccessful()
TestResult
collects the results of executing a test case. It is an instance of the Collecting Parameter pattern. The test framework distinguishes between failures and errors. A failure is anticipated and checked for with assertions. Errors are unanticipated problems like anArrayIndexOutOfBoundsException
.