|
OOoRunner test harness | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lib.Status
Status represents a result of a testing activity performed. The result is described in two ways: state and runtime state. The state describes if the activity was successful (OK state) or not (FAILED state). The runtime state describes what happend during the activity: the test can be: - PASSED - the activity completed normally (although it can complete with FAILED state) - SKIPPED - the activity was not performed because of a reason (it also can has OK or FAILED state) - EXCEPTION - the activity was abnormally terminated because of an unexpected exception. It always has a FAILED state. - EXCLUDED - the activity is expected to fail. The state represents how the state really completed: OK or FAILED. - other variants are not formalized now and can be represented by Status.failed() method. They always have a FAILED state.
Field Summary | |
static int |
EXCEPTION
The constant represents EXCEPTION runtime state. |
static int |
EXCLUDED
The constant represents EXCLUDED runtime state. |
static int |
FAILED
The constant represents FAILED state. |
static int |
OK
The constant represents OK state. |
static int |
PASSED
The constatnt represents PASSED runtime state. |
static int |
SKIPPED
The constant represents SKIPPED runtime state. |
Constructor Summary | |
Status()
|
Method Summary | |
static Status |
exception(Throwable t)
This is a factory method for creating a Status representing an exception activity termination. |
static Status |
excluded()
This is a factory method for creating a Status representing that the result of the activity was excluded. |
static Status |
failed(String reason)
Creates a Status representing an activity failed for an arbitrary reason. |
String |
getDescription()
|
abstract int |
getRunState()
Returns the run state of the Status. |
abstract String |
getRunStateString()
Returns the string describing run state of the Status. |
abstract int |
getState()
Returns the test state of the Status. |
boolean |
isException()
Checks whether the status runstate is exception. |
boolean |
isExcluded()
Checks whether the status runstate is excluded. |
boolean |
isFailed()
Checks whether the status state is failed. |
boolean |
isOK()
Checks whether the status state is ok. |
boolean |
isPassed()
Checks whether the status runstate is passed. |
boolean |
isSkipped()
Checks whether the status runstate is skipped. |
static Status |
passed(boolean state)
This is a factory method for creating a Status representing normal actibity termination. |
static Status |
skipped(boolean state)
This is a factory method for creating a Status representing a skipped activity. |
String |
toString()
The method returns a human-readable description of the status. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PASSED
public static final int EXCEPTION
public static final int EXCLUDED
public static final int SKIPPED
public static final int FAILED
public static final int OK
Constructor Detail |
public Status()
Method Detail |
public abstract int getState()
public abstract int getRunState()
public abstract String getRunStateString()
public static Status passed(boolean state)
state
- describes a test state (OK if state == true, FAILED
otherwise).public static Status exception(Throwable t)
t
- the exception with that the activity completed.public static Status skipped(boolean state)
state
- describes a test state (OK if state == true, FAILED
otherwise).public static Status excluded()
public static Status failed(String reason)
reason
- describes why the activity failedpublic String toString()
toString
in class Object
public boolean isPassed()
public boolean isSkipped()
public boolean isExcluded()
public boolean isException()
public boolean isFailed()
public boolean isOK()
public String getDescription()
|
OOoRunner test harness | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |