|
OOoRunner test harness | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lib.TestEnvironment
The class contains an instance of a given implementation object and auxiliary objects associated with it and required for the object testing.
TestCase
Field Summary | |
protected boolean |
disposed
Indicates that the testObject is in invalid state and should notbe used for testing anymore. |
protected Hashtable |
relations
Contains object relations - auxiliary objects associated with the tested object and required for testing. |
protected XInterface |
testObject
An instance of the tested implementation object. |
Constructor Summary | |
TestEnvironment(XInterface testObject)
Creates an instance of test environment with testObject. |
Method Summary | |
void |
addObjRelation(String name,
Object relation)
Adds to the environment an auxiliary object required for testing. |
void |
dispose()
Makes the environment invalid, i.e. |
Object |
getObjRelation(String name)
Returns an auxiliary object referenced by tname. |
TestCase |
getTestCase()
|
XInterface |
getTestObject()
|
boolean |
hasObjRelation(String name)
Checks if an auxiliary object has been registered with name |
boolean |
isDisposed()
Checks if the environment has been disposed. |
void |
setTestCase(TestCase tCase)
Sets the TestCase that created the environment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Hashtable relations
protected XInterface testObject
protected boolean disposed
Constructor Detail |
public TestEnvironment(XInterface testObject)
testObject
- object to testIllegalArgumentException
- if the testObject is
null.Method Detail |
public XInterface getTestObject()
public void addObjRelation(String name, Object relation)
name
- a name to reference the auxiliary objectrelation
- the auxiliary object related to the tested onepublic Object getObjRelation(String name)
name
- a name of the object relationpublic boolean hasObjRelation(String name)
name
- a name referencing an auxiliarx objectpublic void setTestCase(TestCase tCase)
TestCase
that created the environment.public TestCase getTestCase()
TestCase
created the environment.public void dispose()
public boolean isDisposed()
dispose()
|
OOoRunner test harness | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |