|
AROM-2_2_13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--helix.util.TestResult
A TestResult collects the results of a test. This class can be used
as a method parameter to collect the events (errors or failures) that prevent the
method's execution of being successful.
| Constructor Summary | |
TestResult()
Creates a new TestResult instance. |
|
| Method Summary | |
void |
addError(Throwable t)
Records the supplied error. |
void |
addFailure(String message)
Records a new failure described by the supplied message. |
int |
errorCount()
Returns the number of errors recorded by this test result. |
Iterator |
errors()
Returns an iterator over the recorded errors. |
int |
failureCount()
Returns the number of failures recorded by this test result. |
Iterator |
failures()
Returns an iterator over the recorded failures. |
String |
toString()
Returns a string representation of this test result. |
boolean |
wasSuccessful()
Returns true if the test was successful. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TestResult()
TestResult instance.
| Method Detail |
public void addError(Throwable t)
t - a Throwable valuepublic void addFailure(String message)
message - a String valuepublic int errorCount()
public Iterator errors()
Iterator valuepublic int failureCount()
public Iterator failures()
Iterator valuepublic boolean wasSuccessful()
true if the test was successful. A test is
successful if no errors nor failures has been recorded.
boolean valuepublic String toString()
toString in class ObjectString value
|
AROM-2_2_13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||