|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.groboutils.junit.v1.SysPropertiesUtil
Utility that allows for easy setting and reseting of System properties. Some classes that need testing may depend upon a System property setting, and this class will help testing that. This is JDK 1.1 and above compatible.
Each instance of this utility should be created in the setUp() method of the test case, then the utility should have its reset() method called in the tearDown() method. This ensures that the standard system properties have been set correctly.
Constructor Summary | |
SysPropertiesUtil()
Each instance should be an instance variable for a test class, and it should be created in the setUp() method. |
Method Summary | |
void |
reset()
Resets the system properties to the way they were when this class was created. |
void |
setValue(java.lang.String key,
java.lang.String newVal)
Sets the system property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SysPropertiesUtil()
Method Detail |
public void setValue(java.lang.String key, java.lang.String newVal)
public void reset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |