Package de.cuioss.test.jsf.util
Class ConfigurationHelper
- java.lang.Object
-
- de.cuioss.test.jsf.util.ConfigurationHelper
-
public final class ConfigurationHelper extends Object
Helper class providing some utility methods for handling configuration.- Author:
- Oliver Wolff
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconfigureApplication(Object testClass, ApplicationConfigDecorator registry, Collection<JsfTestConfiguration> configurations)Instantiates the givenApplicationConfiguratorand calls them with the givenApplicationConfigDecorator.static voidconfigureComponents(Object testClass, ComponentConfigDecorator registry, Collection<JsfTestConfiguration> configurations)Instantiates the givenComponentConfiguratorand calls them with the givenComponentConfigDecorator.static voidconfigureManagedBeans(Object testClass, BeanConfigDecorator registry, Collection<JsfTestConfiguration> configurations)Instantiates the givenBeanConfiguratorand calls them with the givenBeanConfigDecorator.static voidconfigureRequestConfig(Object testClass, RequestConfigDecorator registry, Collection<JsfTestConfiguration> configurations)Instantiates the givenRequestConfiguratorand calls them with the givenRequestConfigDecorator.static Set<JsfTestConfiguration>extractJsfTestConfiguration(Class<?> annotated)Checks the given type for the annotationJsfTestConfigurationand and puts all found in the immutableSetto be returned
-
-
-
Method Detail
-
extractJsfTestConfiguration
public static Set<JsfTestConfiguration> extractJsfTestConfiguration(Class<?> annotated)
Checks the given type for the annotationJsfTestConfigurationand and puts all found in the immutableSetto be returned- Parameters:
annotated- the class that may or may not provide the annotations, must not be null- Returns:
- immutable
Setof foundJsfTestConfigurationelements.
-
configureComponents
public static void configureComponents(Object testClass, ComponentConfigDecorator registry, Collection<JsfTestConfiguration> configurations)
Instantiates the givenComponentConfiguratorand calls them with the givenComponentConfigDecorator. In case the given testClass instance also implementsComponentConfiguratorthe corresponding method will be called after the others- Parameters:
testClass- the actual instance of test, must not be nullregistry- to be passed the the individual instances ofComponentConfigurator, must not be nullconfigurations- the previously extracted annotations, must not be null but may be empty.
-
configureManagedBeans
public static void configureManagedBeans(Object testClass, BeanConfigDecorator registry, Collection<JsfTestConfiguration> configurations)
Instantiates the givenBeanConfiguratorand calls them with the givenBeanConfigDecorator. In case the given testClass instance also implementsBeanConfiguratorthe corresponding method will be called after the others- Parameters:
testClass- the actual instance of test, must not be nullregistry- to be passed the the individual instances ofBeanConfigurator, must not be nullconfigurations- the previously extracted annotations, must not be null but may be empty.
-
configureApplication
public static void configureApplication(Object testClass, ApplicationConfigDecorator registry, Collection<JsfTestConfiguration> configurations)
Instantiates the givenApplicationConfiguratorand calls them with the givenApplicationConfigDecorator. In case the given testClass instance also implementsApplicationConfiguratorthe corresponding method will be called after the others- Parameters:
testClass- the actual instance of test, must not be nullregistry- to be passed the the individual instances ofApplicationConfigurator, must not be nullconfigurations- the previously extracted annotations, must not be null but may be empty.
-
configureRequestConfig
public static void configureRequestConfig(Object testClass, RequestConfigDecorator registry, Collection<JsfTestConfiguration> configurations)
Instantiates the givenRequestConfiguratorand calls them with the givenRequestConfigDecorator. In case the given testClass instance also implementsRequestConfiguratorthe corresponding method will be called after the others- Parameters:
testClass- the actual instance of test, must not be nullregistry- to be passed the the individual instances ofRequestConfigurator, must not be nullconfigurations- the previously extracted annotations, must not be null but may be empty.
-
-