lib
Class TestResult
java.lang.Object
|
+--lib.Status
|
+--lib.TestResult
- public class TestResult
- extends Status
The class supports interface tests development and Status calculation.
Methods inherited from class lib.Status |
exception, excluded, failed, getDescription, isException, isExcluded, isFailed, isOK, isPassed, isSkipped, passed, skipped, toString |
testedMethods
protected Hashtable testedMethods
- Contains methods having been tested and their results.
TestResult
public TestResult()
getRunStateString
public String getRunStateString()
- Returns the string describing run state of the test, e.g. PASSED,
SKIPPED, etc.
- Overrides:
getRunStateString
in class Status
- See Also:
Status
getState
public int getState()
- Returns the state of the test, e.g. OK, FAILED.
- Overrides:
getState
in class Status
- See Also:
Status
getRunState
public int getRunState()
- Returns the run state of the test, eg.g. : PASSED, SKIPPED, etc.
- Overrides:
getRunState
in class Status
- See Also:
Status
tested
public boolean tested(String method,
boolean result)
- The method makes method tested with the result, i.e. it adds to its
state OK (if result == true) or FAILED (if result == false) status
and makes the state of the method completed. It's equal to
tested(method, Status(result)) call.
- Parameters:
method
- reffers to the method whoch was testedresult
- the result of testing the method- Returns:
- the result value
- See Also:
tested(String, Status)
tested
public boolean tested(String method,
Status status)
- The method makes the method tested with the status, i.e. it adds the
status to its state and makes it completed.
- Parameters:
method
- reffers to the method whoch was testedstatus
- describes the result of testing the method- Returns:
- true if status is OK, false otherwise.
getTestedMethods
public String[] getTestedMethods()
- Returns:
- methods available in the interface tested.
hasMethod
public boolean hasMethod(String method)
- Returns:
- true if the method belongs to the interface tested,
false otherwise.
getStatusFor
public Status getStatusFor(String method)
- Returns:
- status of testing the method, if it is available (was set by
the tested or assert method), null otherwise.
- See Also:
tested(String, boolean)
,
tested(String, Status)
,
#assert