suramadu.util.exec
Class TestProperties

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended bysuramadu.util.exec.TestProperties
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable
Direct Known Subclasses:
AsynchronousEvent.TestProps, ClassLoading.TestProps, ContextSwitch.TestProps, CostOverrun.TestProps, FloatingPoint.TestProps, IntegerOps.TestProps, InterruptLatency.TestProps, Jitter.TestProps, JNIOverhead.TestProps, MissedDeadline.TestProps, PriorityInheritance.TestProps, ScopeMemoryTest.TestProps, Shifting.TestProps, SuramaduTestStub.TestProps, Synchronization.TestProps, VMRuntimeSize.TestProps, WaitFreeWrite.TestProps

public abstract class TestProperties
extends java.util.Properties

The TestProperties class supports the loading and maintenance of a properties file with naming convention of <class name>.properties This object is mutable, so properties that are loaded are subject to change by the user

Version:
$Id: TestProperties.html,v 1.1 2004/09/23 15:35:05 mbi Exp $
Author:
Mark B. Indictor
See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
           
static java.lang.String CPS
           
static int DATAFILEHEADERWIDTH
           
static java.lang.String FILEOUTPUTERROR
           
static java.lang.String HOSTNAME
           
static java.lang.String INPUT_PREFIX
           
static java.lang.String OSNAME
           
static java.lang.String OSVERSION
           
static java.lang.String OUTPUT_PREFIX
           
static java.lang.String PLATFORM
           
static java.lang.String PROPERTIESLOADED
           
static java.lang.String RAWDATAFILE
           
static java.lang.String TIMESTAMP
           
 
Constructor Summary
TestProperties()
          No arg constructor.
TestProperties(java.lang.Class aClass)
          Constructor that takes an a Class object.
TestProperties(java.lang.Class aClass, java.util.Properties defaultProps)
          Constructor that takes an a Class object and another TestProperties object to act as a source for default properties should the property not exist in the properties file for this class.
TestProperties(java.lang.Class aClass, java.lang.String[] defaultProps)
          Constructor that takes an a Class object and an array of Strings.
TestProperties(PropertiesFileName aPfn, java.util.Properties defaultProps)
          Constructor that takes an a Class object and another TestProperties object to act as a source for default properties should the property not exist in the properties file for this class.
 
Method Summary
 java.lang.Object _get(java.lang.Object key)
          Get the value for the specified property.
 java.lang.Object _put(java.lang.Object key, java.lang.Object value)
          Overloaded from java.util.Properties.
static java.util.Properties arrayToProperties(java.lang.Class aClass, java.lang.String[] props)
          This is a helper method that translates an array of Strings into a TestProperties object.
 void close()
          Writes the output file
static java.util.Iterator factory(java.lang.Class pClass, java.lang.Class aClass)
          This static method is used to get an array of properties objects for multiple runs of the same Suramadu test.
static java.util.Iterator factory(java.lang.Class pClass, java.lang.Class aClass, java.util.Properties defaultProps)
          This static method is used to get an array of properties objects for multiple runs of the same Suramadu test.
static java.util.Iterator factory(java.lang.Class pClass, java.lang.Class aClass, java.lang.String[] defaultProps)
          This static method is used to get an array of properties objects for multiple runs of the same Suramadu test.
 boolean getBooleanInputProperty(java.lang.String key)
           
 boolean getBooleanOutputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 java.lang.String getClassName()
          Get the full package and class name of the class for which this properties object was created.
 double getDoubleInputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 double getDoubleOutputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 float getFloatInputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 float getFloatOutputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 java.lang.String getInputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 int getIntInputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 int getIntOutputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 long getLongInputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 long getLongOutputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 java.lang.String getOutputProperty(java.lang.String key)
          The get*Property() methods are the normal methods used to retrieve a property's value.
 java.lang.String getPackageName()
          Get the name of the package containing for the current properties file.
 java.lang.String getPropertiesFilename()
          Get the fully qualified path of the properties file acting as the source to this TestProperties instantiation.
 java.lang.String getProperty(java.lang.String key)
          Get the value for the specified property.
 void loadProperties(java.lang.Class aClass, java.util.Properties defaultProps)
          Load class properties
 void loadProperties(java.lang.Class aClass, java.lang.String[] defaultProps)
          Load class properties
 void loadProperties(PropertiesFileName aPfn, java.util.Properties defaultProps)
          Load class properties
 java.util.Enumeration propertyNames()
          Recursive procedures
 java.util.Enumeration propertyNames(boolean shortNames)
           
 void putAll(java.util.Map t)
          Overloads Hashtable.putAll().
 void read(java.io.InputStream is)
           
 java.lang.Object setInputProperty(java.lang.String key, boolean value)
           
 java.lang.Object setInputProperty(java.lang.String key, double value)
           
 java.lang.Object setInputProperty(java.lang.String key, float value)
           
 java.lang.Object setInputProperty(java.lang.String key, int value)
           
 java.lang.Object setInputProperty(java.lang.String key, long value)
           
 java.lang.Object setInputProperty(java.lang.String key, java.lang.Number value)
          setting input properties
 java.lang.Object setInputProperty(java.lang.String key, java.lang.String value)
           
 java.lang.Object setOutputProperty(java.lang.String key, boolean value)
           
 java.lang.Object setOutputProperty(java.lang.String key, java.util.Collection c)
           
 java.lang.Object setOutputProperty(java.lang.String key, java.util.Collection c, boolean newFile)
           
 java.lang.Object setOutputProperty(java.lang.String key, double value)
           
 java.lang.Object setOutputProperty(java.lang.String key, double[] values)
           
 java.lang.Object setOutputProperty(java.lang.String key, double[] values, boolean newFile)
           
 java.lang.Object setOutputProperty(java.lang.String key, float value)
           
 java.lang.Object setOutputProperty(java.lang.String key, float[] values)
           
 java.lang.Object setOutputProperty(java.lang.String key, float[] values, boolean newFile)
           
 java.lang.Object setOutputProperty(java.lang.String key, int value)
           
 java.lang.Object setOutputProperty(java.lang.String key, int[] values)
           
 java.lang.Object setOutputProperty(java.lang.String key, int[] values, boolean newFile)
           
 java.lang.Object setOutputProperty(java.lang.String key, long value)
           
 java.lang.Object setOutputProperty(java.lang.String key, long[] values)
           
 java.lang.Object setOutputProperty(java.lang.String key, long[] values, boolean newFile)
           
 java.lang.Object setOutputProperty(java.lang.String key, java.lang.Number value)
           
 java.lang.Object setOutputProperty(java.lang.String key, java.lang.String value)
          setting output properties
 java.lang.Object setProperty(java.lang.String key, java.lang.String value)
          Overloaded from java.util.Properties.
 java.lang.String toString()
          Displays a nicely formatted summary of test and its current working property list.
 
Methods inherited from class java.util.Properties
getProperty, list, list, load, save, store
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, remove, size, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INPUT_PREFIX

public static final java.lang.String INPUT_PREFIX
See Also:
Constant Field Values

OUTPUT_PREFIX

public static final java.lang.String OUTPUT_PREFIX
See Also:
Constant Field Values

TIMESTAMP

public static final java.lang.String TIMESTAMP
See Also:
Constant Field Values

PLATFORM

public static final java.lang.String PLATFORM
See Also:
Constant Field Values

OSNAME

public static final java.lang.String OSNAME
See Also:
Constant Field Values

OSVERSION

public static final java.lang.String OSVERSION
See Also:
Constant Field Values

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

HOSTNAME

public static final java.lang.String HOSTNAME
See Also:
Constant Field Values

CPS

public static final java.lang.String CPS
See Also:
Constant Field Values

PROPERTIESLOADED

public static final java.lang.String PROPERTIESLOADED
See Also:
Constant Field Values

RAWDATAFILE

public static final java.lang.String RAWDATAFILE
See Also:
Constant Field Values

FILEOUTPUTERROR

public static final java.lang.String FILEOUTPUTERROR
See Also:
Constant Field Values

DATAFILEHEADERWIDTH

public static final int DATAFILEHEADERWIDTH
See Also:
Constant Field Values
Constructor Detail

TestProperties

public TestProperties()
No arg constructor. Use loadProperties(class, defaults) to instantiate class properties at a later time.


TestProperties

public TestProperties(java.lang.Class aClass)
               throws PropertyValidationException
Constructor that takes an a Class object. No default properties are specified.

Parameters:
aClass - the name of the class whose properties file is to be loaded

TestProperties

public TestProperties(java.lang.Class aClass,
                      java.lang.String[] defaultProps)
               throws PropertyValidationException
Constructor that takes an a Class object and an array of Strings. This array must have an even length since key and value pairs will be extracted from it.

Parameters:
aClass - the name of the class whose properties file is to be loaded
defaultProps - An array of Strings that will define the contents of the default properties for this instance. It's length must be even (name value pairs). The even numbered elements (zero based) are names, the odd numbered elements are values.
See Also:
#TestProperties( Class aClass, qqProperties defaultProps )

TestProperties

public TestProperties(java.lang.Class aClass,
                      java.util.Properties defaultProps)
               throws PropertyValidationException
Constructor that takes an a Class object and another TestProperties object to act as a source for default properties should the property not exist in the properties file for this class.

Parameters:
aClass - the name of the class whose properties file is to be loaded
defaultProps - if provided (not null), will provide a set of default values for unspecified properties

TestProperties

public TestProperties(PropertiesFileName aPfn,
                      java.util.Properties defaultProps)
               throws PropertyValidationException
Constructor that takes an a Class object and another TestProperties object to act as a source for default properties should the property not exist in the properties file for this class.

Parameters:
aPfn - A PropertiesFileName class for the properties file to be read.
defaultProps - if provided (not null), will provide a set of default values for unspecified properties
Method Detail

factory

public static java.util.Iterator factory(java.lang.Class pClass,
                                         java.lang.Class aClass)
                                  throws PropertyValidationException,
                                         java.lang.InstantiationException,
                                         java.lang.IllegalAccessException
This static method is used to get an array of properties objects for multiple runs of the same Suramadu test.

Parameters:
pClass - The specific subclass of TestProperties being instantiated.
aClass - The class of the actual test being run.
Returns:
An array of TestProperties objects representing discreet property sets for multiple test runs.
Throws:
PropertyValidationException
java.lang.InstantiationException
java.lang.IllegalAccessException
See Also:
TestProperties(Class)

factory

public static java.util.Iterator factory(java.lang.Class pClass,
                                         java.lang.Class aClass,
                                         java.lang.String[] defaultProps)
                                  throws PropertyValidationException,
                                         java.lang.InstantiationException,
                                         java.lang.IllegalAccessException
This static method is used to get an array of properties objects for multiple runs of the same Suramadu test.

Parameters:
pClass - The specific subclass of TestProperties being instantiated.
aClass - The class of the actual test being run.
defaultProps -
Returns:
An array of TestProperties objects representing discreet property sets for multiple test runs.
Throws:
PropertyValidationException
java.lang.InstantiationException
java.lang.IllegalAccessException
See Also:
TestProperties(Class, String[])

factory

public static java.util.Iterator factory(java.lang.Class pClass,
                                         java.lang.Class aClass,
                                         java.util.Properties defaultProps)
                                  throws PropertyValidationException,
                                         java.lang.InstantiationException,
                                         java.lang.IllegalAccessException
This static method is used to get an array of properties objects for multiple runs of the same Suramadu test.

Parameters:
pClass - The specific subclass of TestProperties being instantiated.
aClass - The class of the actual test being run.
defaultProps -
Returns:
An array of TestProperties objects representing discreet property sets for multiple test runs.
Throws:
PropertyValidationException
java.lang.InstantiationException
java.lang.IllegalAccessException
See Also:
TestProperties(Class, Properties)

loadProperties

public void loadProperties(java.lang.Class aClass,
                           java.util.Properties defaultProps)
                    throws PropertyValidationException
Load class properties

Parameters:
aClass -
defaultProps -
Throws:
PropertyValidationException - If a property is malformed

loadProperties

public void loadProperties(java.lang.Class aClass,
                           java.lang.String[] defaultProps)
                    throws PropertyValidationException
Load class properties

Parameters:
aClass -
defaultProps -
Throws:
PropertyValidationException

loadProperties

public void loadProperties(PropertiesFileName aPfn,
                           java.util.Properties defaultProps)
                    throws PropertyValidationException
Load class properties

Parameters:
aPfn -
defaultProps -
Throws:
PropertyValidationException - If a property is malformed

getPackageName

public java.lang.String getPackageName()
Get the name of the package containing for the current properties file.

Returns:
the name of the package containing for the current properties file

getPropertiesFilename

public java.lang.String getPropertiesFilename()
Get the fully qualified path of the properties file acting as the source to this TestProperties instantiation.

Returns:
the fully qualified path of the properties file

getClassName

public java.lang.String getClassName()
Get the full package and class name of the class for which this properties object was created.

Returns:
the full package and class name of the class for which this properties object was created.

getOutputProperty

public java.lang.String getOutputProperty(java.lang.String key)
                                   throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value, or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getIntOutputProperty

public int getIntOutputProperty(java.lang.String key)
                         throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value, or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getLongOutputProperty

public long getLongOutputProperty(java.lang.String key)
                           throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getFloatOutputProperty

public float getFloatOutputProperty(java.lang.String key)
                             throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getDoubleOutputProperty

public double getDoubleOutputProperty(java.lang.String key)
                               throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getBooleanOutputProperty

public boolean getBooleanOutputProperty(java.lang.String key)
                                 throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getInputProperty

public java.lang.String getInputProperty(java.lang.String key)
                                  throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value, or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getIntInputProperty

public int getIntInputProperty(java.lang.String key)
                        throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value, or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getLongInputProperty

public long getLongInputProperty(java.lang.String key)
                          throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getFloatInputProperty

public float getFloatInputProperty(java.lang.String key)
                            throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getDoubleInputProperty

public double getDoubleInputProperty(java.lang.String key)
                              throws PropertyValidationException
The get*Property() methods are the normal methods used to retrieve a property's value. All property names are forced to conform with the 'package1.package2.classname.propertyname' convention, but may be specified simply with 'propertyname'.

Parameters:
key - the property name
Returns:
value or 0 if the specified property does not exist.
Throws:
java.lang.NumberFormatException - If there is a parsing error.
PropertyValidationException

getBooleanInputProperty

public boolean getBooleanInputProperty(java.lang.String key)
                                throws PropertyValidationException
Parameters:
key -
Returns:
value of specified boolean input property
Throws:
PropertyValidationException

propertyNames

public java.util.Enumeration propertyNames()
Recursive procedures


propertyNames

public java.util.Enumeration propertyNames(boolean shortNames)

getProperty

public java.lang.String getProperty(java.lang.String key)
Get the value for the specified property. As with its superclass java.util.Properties, it will recursively search through all default property sets until it finds a value or runs out of default sets.

Parameters:
key - the name of the property
Returns:
the value of the property, or null if the specified property does not exist.
See Also:
Properties

setProperty

public java.lang.Object setProperty(java.lang.String key,
                                    java.lang.String value)
Overloaded from java.util.Properties. It is intercepted so that the package1.package2.classname.propertyname' property naming constraints can be enforced.

Parameters:
key - The property name whose value will be set.
value - The value that will be set for the named property.
Returns:
the previous value of this property.
See Also:
Properties

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          java.lang.String value)
setting output properties


setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          java.lang.Number value)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          boolean value)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          int value)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          long value)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          float value)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          double value)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          java.util.Collection c)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          java.util.Collection c,
                                          boolean newFile)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          int[] values)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          int[] values,
                                          boolean newFile)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          long[] values)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          long[] values,
                                          boolean newFile)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          float[] values)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          float[] values,
                                          boolean newFile)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          double[] values)

setOutputProperty

public java.lang.Object setOutputProperty(java.lang.String key,
                                          double[] values,
                                          boolean newFile)

setInputProperty

public java.lang.Object setInputProperty(java.lang.String key,
                                         java.lang.String value)
                                  throws PropertyValidationException
Throws:
PropertyValidationException

setInputProperty

public java.lang.Object setInputProperty(java.lang.String key,
                                         java.lang.Number value)
setting input properties


setInputProperty

public java.lang.Object setInputProperty(java.lang.String key,
                                         boolean value)
                                  throws PropertyValidationException
Throws:
PropertyValidationException

setInputProperty

public java.lang.Object setInputProperty(java.lang.String key,
                                         int value)
                                  throws PropertyValidationException
Throws:
PropertyValidationException

setInputProperty

public java.lang.Object setInputProperty(java.lang.String key,
                                         long value)
                                  throws PropertyValidationException
Throws:
PropertyValidationException

setInputProperty

public java.lang.Object setInputProperty(java.lang.String key,
                                         float value)
                                  throws PropertyValidationException
Throws:
PropertyValidationException

setInputProperty

public java.lang.Object setInputProperty(java.lang.String key,
                                         double value)
                                  throws PropertyValidationException
Throws:
PropertyValidationException

_get

public java.lang.Object _get(java.lang.Object key)
Get the value for the specified property. As with its superclass java.util.Properties, it will recursively search through all default property sets until it finds a value or runs out of default sets.

Parameters:
key - the name of the property
Returns:
the value of the property, or null if the specified property does not exist.
See Also:
Properties

_put

public java.lang.Object _put(java.lang.Object key,
                             java.lang.Object value)
Overloaded from java.util.Properties. It is intercepted so that the package1.package2.classname.propertyname' property naming constraints can be enforced.

Parameters:
key - The property name whose value will be set.
value - The value that will be set for the named property.
Returns:
the previous value of this property.
See Also:
Properties

putAll

public void putAll(java.util.Map t)
Overloads Hashtable.putAll(). Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map.

Parameters:
t - Mappings to be stored in this map.
Throws:
java.lang.NullPointerException - if the specified map is null.
See Also:
Hashtable

close

public void close()
           throws java.io.IOException
Writes the output file

Throws:
java.io.IOException

read

public void read(java.io.InputStream is)
          throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Displays a nicely formatted summary of test and its current working property list.

Returns:
A String formatted for printing.

arrayToProperties

public static java.util.Properties arrayToProperties(java.lang.Class aClass,
                                                     java.lang.String[] props)
                                              throws PropertyValidationException
This is a helper method that translates an array of Strings into a TestProperties object. The length of the array is enforced to be even, and a message is displayed on standard error and the defaults are not created if this is not the case.

Parameters:
aClass - the name of the class whose properties file is to be loaded
props - An array of Strings that will define the contents of the default properties for this instance. It's length must be even (name value pairs). The even numbered elements (zero based) are names, the odd numbered elements are values.
Returns:
a new instance of TestProperties containing the default properties specified in the props argument.
Throws:
PropertyValidationException