Package de.cuioss.test.jsf.component
Class AbstractComponentTest<T extends UIComponent>
- java.lang.Object
-
- de.cuioss.test.jsf.junit5.JsfEnabledTestEnvironment
-
- de.cuioss.test.jsf.component.AbstractComponentTest<T>
-
- Type Parameters:
T- identifying the type to be tested, at least anUIComponent
- All Implemented Interfaces:
JsfEnvironmentConsumer,de.cuioss.test.valueobjects.objects.ConfigurationCallBackHandler<T>,de.cuioss.test.valueobjects.util.GeneratorRegistry
- Direct Known Subclasses:
AbstractUiComponentTest
@EnableGeneratorRegistry public abstract class AbstractComponentTest<T extends UIComponent> extends JsfEnabledTestEnvironment implements de.cuioss.test.valueobjects.objects.ConfigurationCallBackHandler<T>, de.cuioss.test.valueobjects.util.GeneratorRegistry
Base class for testingUIComponents.Supported Contracts / Configurations
- Handling of Property Generators using annotations, see
de.cuioss.test.valueobjects.api.generator - Reflection and annotation based property handling, see
de.cuioss.test.valueobjects.api.property
It acts as an
ConfigurationCallBackHandler, saying after initialization and prior to testing the methodConfigurationCallBackHandler.configure(Object)will be called allowing the concrete test-class to do some specific configuration e.g. calling init-methods and such.You can easily access pre-configured instance by calling
anyComponent().- Author:
- Oliver Wolff
-
-
Constructor Summary
Constructors Constructor Description AbstractComponentTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TanyComponent()protected de.cuioss.test.valueobjects.objects.ParameterizedInstantiator<T>getInstantiator()NeededParameterizedInstantiatorfor creating test ObjectsClass<T>getTargetClass()voidinitializeBaseClass()Initializes all contracts, properties and generator-
Methods inherited from class de.cuioss.test.jsf.junit5.JsfEnabledTestEnvironment
getEnvironmentHolder, setEnvironmentHolder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.cuioss.test.valueobjects.objects.ConfigurationCallBackHandler
configure
-
Methods inherited from interface de.cuioss.test.valueobjects.util.GeneratorRegistry
registerAdditionalGenerators
-
Methods inherited from interface de.cuioss.test.jsf.util.JsfEnvironmentConsumer
assertNavigatedWithOutcome, assertRedirect, getApplication, getApplicationConfigDecorator, getBeanConfigDecorator, getComponentConfigDecorator, getExternalContext, getFacesContext, getRequestConfigDecorator, getResponse
-
-
-
-
Constructor Detail
-
AbstractComponentTest
public AbstractComponentTest()
-
-
Method Detail
-
initializeBaseClass
@BeforeEach public void initializeBaseClass()
Initializes all contracts, properties and generator
-
anyComponent
public T anyComponent()
- Returns:
- a minimal configured instance of the
UIComponentwithConfigurationCallBackHandler.configure(Object)being already called. 'Minimal configured' hereby defined as all attributes that are required are set
-
getTargetClass
public Class<T> getTargetClass()
-
getInstantiator
protected de.cuioss.test.valueobjects.objects.ParameterizedInstantiator<T> getInstantiator()
NeededParameterizedInstantiatorfor creating test Objects
-
-