(incubating) | The Free and Open Productivity Suite
OOoRunner test harness

lib
Class MultiPropertyTest.PropertyValueSwitcher

java.lang.Object
  |
  +--lib.MultiPropertyTest.PropertyTester
        |
        +--lib.MultiPropertyTest.PropertyValueSwitcher
Enclosing class:
MultiPropertyTest

public class MultiPropertyTest.PropertyValueSwitcher
extends MultiPropertyTest.PropertyTester

Extension for PropertyTester which switches two different values. getNewValue() method of this class returns one of these two values depending on the old value, so new value is not equal to old value.


Constructor Summary
MultiPropertyTest.PropertyValueSwitcher(Object val1, Object val2)
          Constructs a property tester with two different values specified as parameters.
 
Method Summary
protected  Object getNewValue(String propName, Object old)
          Overriden method of PropertyTester which retruns new value from two values specified.
 
Methods inherited from class lib.MultiPropertyTest.PropertyTester
checkResult, compare, testProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiPropertyTest.PropertyValueSwitcher

public MultiPropertyTest.PropertyValueSwitcher(Object val1,
                                               Object val2)
Constructs a property tester with two different values specified as parameters.
Parameters:
val1 - Not null value for the property tested.
val1 - Not null value for the property tested which differs from the first value.
Method Detail

getNewValue

protected Object getNewValue(String propName,
                             Object old)
Overriden method of PropertyTester which retruns new value from two values specified.
Overrides:
getNewValue in class MultiPropertyTest.PropertyTester
Returns:
The second value if old value is equal to the first one, the first value otherwise.

OOoRunner test harness

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.