net.sourceforge.jwebunit.util
Class TestingEngineRegistry

java.lang.Object
  extended by net.sourceforge.jwebunit.util.TestingEngineRegistry

public class TestingEngineRegistry
extends java.lang.Object

This will maintain a registry of known testing engines to be used by JWebUnit.

Author:
Julien Henry

Field Summary
static java.lang.String TESTING_ENGINE_HTMLUNIT
          Key of HtmlUnit testing engine.
static java.lang.String TESTING_ENGINE_SELENIUM
          Key of HtmlUnit testing engine.
 
Constructor Summary
TestingEngineRegistry()
           
 
Method Summary
static void addTestingEngine(java.lang.String key, java.lang.String classpath)
          Add a new testing engine.
static java.lang.String getFirstAvailable()
          Get first available testing engine key.
static java.lang.Class<?> getTestingEngineClass(java.lang.String aKey)
          Gets the class based on the key of the class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TESTING_ENGINE_HTMLUNIT

public static final java.lang.String TESTING_ENGINE_HTMLUNIT
Key of HtmlUnit testing engine.

See Also:
Constant Field Values

TESTING_ENGINE_SELENIUM

public static final java.lang.String TESTING_ENGINE_SELENIUM
Key of HtmlUnit testing engine.

See Also:
Constant Field Values
Constructor Detail

TestingEngineRegistry

public TestingEngineRegistry()
Method Detail

getTestingEngineClass

public static java.lang.Class<?> getTestingEngineClass(java.lang.String aKey)
                                                throws java.lang.ClassNotFoundException
Gets the class based on the key of the class.

Parameters:
aKey - Key of the testing engine
Returns:
the testing engine class.
Throws:
java.lang.ClassNotFoundException

addTestingEngine

public static void addTestingEngine(java.lang.String key,
                                    java.lang.String classpath)
                             throws java.lang.ClassNotFoundException
Add a new testing engine.

Parameters:
key - A string to identify the testing engine.
classpath - The full class name.
Throws:
java.lang.ClassNotFoundException - If the class is not in the classpath.

getFirstAvailable

public static java.lang.String getFirstAvailable()
Get first available testing engine key.

Returns:
key of a testing engine, or null is none is available.


Copyright © 2002-2011 SourceForge. All Rights Reserved.