|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.lutris.testutil.Tester
Class use to verify the results of tests.
Field Summary | |
int |
errorCnt
Count of the number of failures that have occured. |
Constructor Summary | |
Tester()
|
Method Summary | |
boolean |
check(java.lang.String testId,
java.lang.Object result,
java.lang.Object expect)
Compare an object representing the result of a test to an expected value. |
boolean |
checkExcept(java.lang.String testId,
java.lang.Object result,
java.lang.Throwable expect)
Compare an object representing an exception that should have occured to an result object. |
void |
failure(java.lang.String testId,
java.lang.String msg)
Generate a general failure message for cases not covered by above functions. |
void |
unexpectedException(java.lang.String testId,
java.lang.Throwable except)
Generate an error message on an unexpected exception. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int errorCnt
Constructor Detail |
public Tester()
Method Detail |
public boolean check(java.lang.String testId, java.lang.Object result, java.lang.Object expect)
result
- An object representing the result. If the object is
derived from type Throwable, then its assumed that an exception
occured.expect
- An object to compare to the result of the test step.
true
if test succeeded, false
if it failed. Generally not used unless test process needs to
have flow altered on failure.public boolean checkExcept(java.lang.String testId, java.lang.Object result, java.lang.Throwable expect)
result
- An object representing the result. If its not an
exception, this is a failure. Often set to null if an exception did
not occur.expect
- The expected exception.
true
if test succeeded, false
if it failed. Generally not used unless test process needs to
have flow altered on failure.public void unexpectedException(java.lang.String testId, java.lang.Throwable except)
except
- Expection.public void failure(java.lang.String testId, java.lang.String msg)
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |