|
OOoRunner test harness | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lib.MultiMethodTest | +--lib.MultiPropertyTest
MultiPropertyTest extends the functionality of MultiMethodTest to support services testing. Since, in most cases, service tests has one method testing most of its properties, the MultiPropertyTest provides unified version of the method: testProperty().
The testProperty() is called, when the MultiMethodTest's testing method is not found in the subclass. So, by defining such methods for properties the standard testing behavioutr can be changed.
The testing behaviour also can be changed by overriding compare(), getNewVAlue() or toString(Object) methods, or by extending PropertyTester class.
MultiMethodTest
,
testProperty(String)
,
#testProperty(String, Propertytester)
,
#getNewValue
,
compare(java.lang.Object, java.lang.Object)
,
toString(Object)
Inner Class Summary | |
class |
MultiPropertyTest.PropertyTester
PropertyTester class defines how to test a property and defined to allow subclasses of MultiPropertyTest to change the testing behaviour more flexible, since the behaviour can be customized for each property separately, by providing subclass of PropertyTester and passing it to testProperty(String, PropertyTester method). |
class |
MultiPropertyTest.PropertyValueSwitcher
Extension for PropertyTester which switches two
different values. |
Field Summary | |
XPropertySet |
oObj
Contains a XPropertySet interface of the tested object. |
protected boolean |
optionalService
|
Fields inherited from class lib.MultiMethodTest |
entry, log, tEnv, tParam, tRes |
Constructor Summary | |
MultiPropertyTest()
|
Method Summary | |
protected void |
before()
Overrides super.before() to check the service is supported by the object. |
protected boolean |
compare(Object obj1,
Object obj2)
Compares two object. |
protected void |
invokeTestMethod(Method meth,
String methName)
Overrides MultiMethodTest.invokeTestMethod(). |
protected void |
testProperty(String propName)
The method performs testing of propName property. |
protected void |
testProperty(String propName,
MultiPropertyTest.PropertyTester propTester)
The method performs testing of propName property using propTester. |
protected void |
testProperty(String propName,
Object val1,
Object val2)
Tests the property using PropertyValueSwitcher
tester and two values for this property. |
protected String |
toString(Object obj)
Gets string representation of the obj. |
Methods inherited from class lib.MultiMethodTest |
after, callMethod, disposeEnvironment, disposeEnvironment, executeMethod, getInterfaceName, getMethodFor, getStatusFor, getTestedClassName, isCalled, isOptional, requiredMethod, run, setField, setStatus, setSubStates |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public XPropertySet oObj
protected boolean optionalService
Constructor Detail |
public MultiPropertyTest()
Method Detail |
protected void before()
before
in class MultiMethodTest
protected void invokeTestMethod(Method meth, String methName)
meth
is not available (meth
== null)
calls testProperty method for the method. Otherwise calls
super.invokeTestMethod().invokeTestMethod
in class MultiMethodTest
#MultiMethodTest.invokeTestMethod()
protected void testProperty(String propName, MultiPropertyTest.PropertyTester propTester)
protected void testProperty(String propName)
protected void testProperty(String propName, Object val1, Object val2)
PropertyValueSwitcher
tester and two values for this property.#PropertyValueSwitcher
protected boolean compare(Object obj1, Object obj2)
protected String toString(Object obj)
|
OOoRunner test harness | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |