Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
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 Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.