Class AbstractComponentTest<T extends UIComponent>

  • Type Parameters:
    T - identifying the type to be tested, at least an UIComponent
    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 testing UIComponents.

    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 method ConfigurationCallBackHandler.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
    • Method Detail

      • initializeBaseClass

        @BeforeEach
        public void initializeBaseClass()
        Initializes all contracts, properties and generator
      • anyComponent

        public T anyComponent()
        Returns:
        a minimal configured instance of the UIComponent with ConfigurationCallBackHandler.configure(Object) being already called. 'Minimal configured' hereby defined as all attributes that are required are set
      • getInstantiator

        protected de.cuioss.test.valueobjects.objects.ParameterizedInstantiator<TgetInstantiator()
        Needed ParameterizedInstantiator for creating test Objects