java.lang.Object | |
↳ | junit.framework.TestResult |
A
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
.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
fErrors | ||||||||||
|
fFailures | ||||||||||
|
fListeners | ||||||||||
|
fRunTests |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Adds an error to the list of errors.
|
||||||||||
|
Adds a failure to the list of failures.
|
||||||||||
|
Registers a TestListener
|
||||||||||
|
Informs the result that a test was completed.
|
||||||||||
|
Gets the number of detected errors.
|
||||||||||
|
Returns an Enumeration for the errors
|
||||||||||
|
Gets the number of detected failures.
|
||||||||||
|
Returns an Enumeration for the failures
|
||||||||||
|
Unregisters a TestListener
|
||||||||||
|
Gets the number of run tests.
|
||||||||||
|
Runs a TestCase.
|
||||||||||
|
Checks whether the test run should stop
|
||||||||||
|
Informs the result that a test will be started.
|
||||||||||
|
Marks that the test run should stop.
|
||||||||||
|
Returns whether the entire test was successful or not.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Runs a TestCase.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Adds an error to the list of errors. The passed in exception caused the error.
Adds a failure to the list of failures. The passed in exception caused the failure.
Registers a TestListener
Returns an Enumeration for the errors
Returns an Enumeration for the failures
Unregisters a TestListener
Checks whether the test run should stop
Informs the result that a test will be started.
Returns whether the entire test was successful or not.