CoCoME System Tests

org.cocome.tradingsystem.systests
Class TestManager

java.lang.Object
  extended by org.cocome.tradingsystem.systests.TestManager

public class TestManager
extends java.lang.Object

This is a factory for the test driver. The information which driver should be used is taken from a property file. The actual test driver is then created via reflection.

Version:
$Rev: 62 $
Author:
Benjamin Hummel, $Author: hummel $

Field Summary
private static TestManager instance
          The only instance of this singleton.
private static java.lang.String[] pathPrefixes
          The search path for the property file.
private  java.util.Properties properties
          The contents of the properties file used to control system tests.
private static java.lang.String propertiesFile
          The name of the file containing the properties controlling system tests.
private  java.lang.Class<ITestDriver> testDriverClass
          The class of the test driver used.
private static java.lang.String testDriverClassKey
          The name of the key giving the class name for the test driver.
 
Constructor Summary
private TestManager()
          Creates a new test manager class.
 
Method Summary
 ITestDriver createTestDriver()
          Returns a newly created test driver.
static TestManager getInstance()
          Returns the single instance of this class.
private  void loadClass()
          Loads the class for the test driver later used to construct test driver instances.
private  void loadProperties()
          Locate and load the properties file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertiesFile

private static final java.lang.String propertiesFile
The name of the file containing the properties controlling system tests.

See Also:
Constant Field Values

pathPrefixes

private static final java.lang.String[] pathPrefixes
The search path for the property file.


testDriverClassKey

private static final java.lang.String testDriverClassKey
The name of the key giving the class name for the test driver.

See Also:
Constant Field Values

instance

private static TestManager instance
The only instance of this singleton.


properties

private final java.util.Properties properties
The contents of the properties file used to control system tests.


testDriverClass

private java.lang.Class<ITestDriver> testDriverClass
The class of the test driver used.

Constructor Detail

TestManager

private TestManager()
             throws TestManagerException
Creates a new test manager class. This is private as this is a singleton. Use getInstance instead.

Throws:
TestManagerException
Method Detail

loadClass

private void loadClass()
                throws TestManagerException
Loads the class for the test driver later used to construct test driver instances.

Throws:
TestManagerException

loadProperties

private void loadProperties()
                     throws TestManagerException
Locate and load the properties file.

Throws:
TestManagerException

createTestDriver

public ITestDriver createTestDriver()
                             throws java.lang.InstantiationException,
                                    java.lang.IllegalAccessException
Returns a newly created test driver.

Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

getInstance

public static TestManager getInstance()
                               throws TestManagerException
Returns the single instance of this class.

Throws:
TestManagerException

CoCoME System Tests

CoCoME System Tests - 0.1