org.sonatype.tests.http.runner
Class ConfigurationHelper

java.lang.Object
  extended by org.sonatype.tests.http.runner.ConfigurationHelper

public class ConfigurationHelper
extends Object

A Helper class for the tasks needed by Junit3SuiteConfiguration and ConfigurationRunner as well.

Author:
Benjamin Hanzelmann

Constructor Summary
ConfigurationHelper()
           
 
Method Summary
static List<SuiteConfigurator> computeConfigurators(Class<?> testClass)
          Use the annotations for the given class to compute the configurators to use.
static Collection<?> computeIgnoredConfiguratorClasses(Class<?> testCls)
          Use the annotations for the given class to compute the configurators to ignore.
static List<Class<? extends SuiteConfigurator>> getConfiguratorClasses(ClassLoader cl, String... lists)
          Load the configurators mentioned in the given lists, using the given classloader.
static List<Class<? extends SuiteConfigurator>> getDefaultConfiguratorClasses()
          Load the default configurator list ("DefaultSuiteConfigurator.list").
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationHelper

public ConfigurationHelper()
Method Detail

computeConfigurators

public static List<SuiteConfigurator> computeConfigurators(Class<?> testClass)
Use the annotations for the given class to compute the configurators to use.

Parameters:
testClass - the class to scan.
Returns:
the configured configurators.
See Also:
Configurators, ConfiguratorList, IgnoreConfigurators

computeIgnoredConfiguratorClasses

public static Collection<?> computeIgnoredConfiguratorClasses(Class<?> testCls)
Use the annotations for the given class to compute the configurators to ignore.

Parameters:
testClass - the class to scan.
Returns:
the ignored configurators.
See Also:
ConfiguratorList, IgnoreConfigurators

getDefaultConfiguratorClasses

public static List<Class<? extends SuiteConfigurator>> getDefaultConfiguratorClasses()
Load the default configurator list ("DefaultSuiteConfigurator.list").

Returns:
the configurator classes defined in the list.

getConfiguratorClasses

public static List<Class<? extends SuiteConfigurator>> getConfiguratorClasses(ClassLoader cl,
                                                                              String... lists)
Load the configurators mentioned in the given lists, using the given classloader.

Parameters:
cl - the classloader to use.
lists - the lists to read.
Returns:
the configurator classes.


Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.