avignon
Class AvignonProperties

java.lang.Object
  extended byavignon.AvignonProperties

public class AvignonProperties
extends java.lang.Object

Provides access to the properties file being used for Avignon. You may start JUnit with a Java system property defining the full path name of the properties file (-DAvignonProperties=full name of properties file). If this property is not defined, the system will look for a file called "avignon.properties" using the method Class.getResourceAsStream.


Field Summary
static java.lang.String PROPERTY_FILE
          The name of the Java system property (java -D property) to use when determining which property file to use.
static java.lang.String SCRIPT_ROOT
          The name of the property to use for determining where to look for scripts.
 
Constructor Summary
AvignonProperties()
           
 
Method Summary
static java.lang.String getAppStart()
          Deprecated. This feature is being deprecated to reduce complexity. It does not work with the IE browser, please use an OpenBrowser tag in each acceptance test instead.
static java.lang.String[] getHandlerPaths()
          Used by the standard JavaTagLoader to prefix class names when searching for AvignonTagHandlers.
static java.lang.String getHtmlTransform()
          Returns the value of the HtmlTransform property.
static java.lang.String getPageDescriptionRoot()
          Returns the value of the PageDescriptionRoot property.
static java.lang.String getProperty(java.lang.String propertyName)
          Allow access to the currently defined avignon.properties file.
static java.lang.String getScriptRoot()
          Determines the directory in which Avignon should look for test suites.
static java.lang.String getSetupScriptName()
          Determines the script that should be run at the start of every AcceptanceTest tag.
static TagLoader[] getTagLoaders()
          Determines the TagLoaders to use when searching for tag handlers.
static java.lang.String getTearDownScriptName()
          Determines the script that should be run at the end of every AcceptanceTest tag.
static java.lang.String getValue(java.lang.String property)
          Gets a named property value.
static void setHandlerPaths(java.lang.String[] value)
          Allows the programmer to override the FQNs that will be used by the standard JavaTagLoader when searching for AvignonTagHandlers.
static void setProperties(java.util.ResourceBundle value)
          Allows the programmer to override the properties that Avignon will see.
static void setTagLoaderNames(java.lang.String value)
          Deprecated. Deprecated in favor of the setProperties method.
static void setTagLoaders(TagLoader[] value)
          Allows the programmer to override the TagLoaders that will be used,
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_FILE

public static final java.lang.String PROPERTY_FILE
The name of the Java system property (java -D property) to use when determining which property file to use.

See Also:
Constant Field Values

SCRIPT_ROOT

public static final java.lang.String SCRIPT_ROOT
The name of the property to use for determining where to look for scripts.

See Also:
Constant Field Values
Constructor Detail

AvignonProperties

public AvignonProperties()
Method Detail

setProperties

public static void setProperties(java.util.ResourceBundle value)
Allows the programmer to override the properties that Avignon will see. Used for unit testing.

Parameters:
value - The properties to use.

setTagLoaders

public static void setTagLoaders(TagLoader[] value)
Allows the programmer to override the TagLoaders that will be used,

Parameters:
value - TagLoaders to use when searching for tag handlers.

getTagLoaders

public static TagLoader[] getTagLoaders()
Determines the TagLoaders to use when searching for tag handlers.

Returns:
The TagLoaders defined by the current properties or those defined by a call to setTagLoaders.

setTagLoaderNames

public static void setTagLoaderNames(java.lang.String value)
Deprecated. Deprecated in favor of the setProperties method.

Allows the programmer to override the names of the TagLoaders to use for unit testing purposes.

Parameters:
value - Vertical bar (|) separated list of TagLoader class names to use.

getValue

public static java.lang.String getValue(java.lang.String property)
Gets a named property value.

Parameters:
property - Name of the property to return.
Returns:
Value of the property or null if it is not defined.

getScriptRoot

public static java.lang.String getScriptRoot()
Determines the directory in which Avignon should look for test suites.

Returns:
The value of the ScriptRoot property in the current properties.

getSetupScriptName

public static java.lang.String getSetupScriptName()
Determines the script that should be run at the start of every AcceptanceTest tag.

Returns:
The value of the TestSetupScript property.

getTearDownScriptName

public static java.lang.String getTearDownScriptName()
Determines the script that should be run at the end of every AcceptanceTest tag.

Returns:
The value of the TestTearDownScript property.

getAppStart

public static java.lang.String getAppStart()
Deprecated. This feature is being deprecated to reduce complexity. It does not work with the IE browser, please use an OpenBrowser tag in each acceptance test instead.

Returns the value of the AppStart property. This should be either an http: type URL or a java:fully qualified name of a Java class that extends java.awt.Frame. This value will be used as the application used in the test state.

Returns:
The value of the AppStart property.

getPageDescriptionRoot

public static java.lang.String getPageDescriptionRoot()
Returns the value of the PageDescriptionRoot property. This defines where WebPageAsserter (used by SubmitPageHandler, for exaple) looks for its page descriptions.

Returns:
The value of the PageDescriptionRoot property.

getHtmlTransform

public static java.lang.String getHtmlTransform()
Returns the value of the HtmlTransform property. This defines where WebPageAsserter looks for its XSL files are located.

Returns:
The value of the HtmlTransform property.

getProperty

public static java.lang.String getProperty(java.lang.String propertyName)
Allow access to the currently defined avignon.properties file.

Parameters:
propertyName - The name of the property.
Returns:
The value of the property or null if the property cannot be found.

getHandlerPaths

public static java.lang.String[] getHandlerPaths()
Used by the standard JavaTagLoader to prefix class names when searching for AvignonTagHandlers.

Returns:
An array of the fully-qualified class name prefixes to use when searching for tag handlers.

setHandlerPaths

public static void setHandlerPaths(java.lang.String[] value)
Allows the programmer to override the FQNs that will be used by the standard JavaTagLoader when searching for AvignonTagHandlers.

Parameters:
value - The FQN prefixes to use.

SourceForge.net Logo