BEA Systems, Inc.

com.compoze.collab.test.framework
Class TestEnvironment


java.lang.Object

  |

  +--com.compoze.collab.test.framework.TestProperties

        |

        +--com.compoze.collab.test.framework.TestEnvironment


public class TestEnvironment
extends TestProperties

Class that provides access to the String properties in the test environment. Instances of this object come in two forms: the singleton instance and snapshot instances. The singleton instance reflects current values and should be used to set properties globally in the test environment. Snapshot instances are created so that values do not change during the course of a test run. This class should be used as follows:


Field Summary
static java.lang.String DEFAULTS_FILE
           
 
Fields inherited from class com.compoze.collab.test.framework.TestProperties
KEY_ACCOUNTSET, KEY_CONFIGS, KEY_CONFIGXML, KEY_DEPLOYTHREADS, KEY_DOMINOLINUXINSTALL, KEY_DOMINOWININSTALL, KEY_FWDEBUG, KEY_GROUPS, KEY_MAPIINSTALL, KEY_PARALLEL, KEY_PARALLELDEPLOY, KEY_PROVIDERS, KEY_REDEPLOY, KEY_SCOPE, KEY_SESSIONTRACE, KEY_SITE, KEY_SITEFILTER, KEY_SITEXML, KEY_UTDEBUG, KEY_VERIFY, KEY_VERIFYHOSTS, m_props
 
Method Summary
 TestEnvironment createSnapshot()
          Creates a snapshot of the test environment.
 java.util.Map getProperties()
          Gets all environment properties (new map of keys to highest precedence values).
 ParameterValue getProperty(java.lang.String sKey)
          Gets an environment property.
static TestEnvironment i()
          Gets the singleton instance of the test environment.
 void setProperty(java.lang.String sKey, java.lang.String sValue)
          Sets an environment property.
 void unsetProperty(java.lang.String sKey)
          Unsets an environment property.
 
Methods inherited from class com.compoze.collab.test.framework.TestProperties
createValuesMap, getPropertyValue, getStringRepresentation, getValueByType, getValueByType, hasProperty, isDefinedKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULTS_FILE


public static final java.lang.String DEFAULTS_FILE
Method Detail

i


public static TestEnvironment i()
Gets the singleton instance of the test environment.

createSnapshot


public TestEnvironment createSnapshot()
Creates a snapshot of the test environment. The parameters in a snapshot will not change regardless of the source of the underlying values.
Returns:
the test environment snapshot

setProperty


public void setProperty(java.lang.String sKey,
                        java.lang.String sValue)
Sets an environment property. If this is the singleton instance, the property is set for all future snapshots. Properties set on a snapshot instance only affect that instance.
Parameters:
sKey - the key of the value to set (not null)
sValue - the value to set (not null)

unsetProperty


public void unsetProperty(java.lang.String sKey)
Unsets an environment property.
Parameters:
sKey - the key of the value to unset (not null)

getProperty


public ParameterValue getProperty(java.lang.String sKey)
Gets an environment property.
Overrides:
getProperty in class TestProperties
Parameters:
sKey - the key of the value to get (not null)
Returns:
the property value

getProperties


public java.util.Map getProperties()
Gets all environment properties (new map of keys to highest precedence values). Underlying values reflect values as of the time this method was called.
Overrides:
getProperties in class TestProperties
Returns:
the properties

BEA Systems, Inc.

Copyright ©1999-2006 BEA Systems, Inc. All rights reserved.