Package io.fluentlenium.adapter.cucumber
Enum Class FluentTestContainer
- All Implemented Interfaces:
Serializable
,Comparable<FluentTestContainer>
,Constable
Container class for
FluentCucumberTest
.
It uses Singleton pattern, based on enum, to make sure that all Cucumber steps use the same container.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionprotected FluentControlContainer
Provide control container across different classes.protected SharedMutator
injector()
Injector used inFluentObjectFactory
for creating instances.instance()
Returns single instance of adapter across all Cucumber steps.void
instantiatePages
(Object obj) Instantiates@Page
annotated fields in the provided container class, if it has any.void
reset()
Resets all properties of this container.static void
setConfigClass
(Class clazz) Sets config class - needed to enable annotation configuration.static FluentTestContainer
Returns the enum constant of this class with the specified name.static FluentTestContainer[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FLUENT_TEST
Instance of FluentTestContainer.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
instance
Returns single instance of adapter across all Cucumber steps.If the adapter hasn't been initialized, then initializes the fields of this container, and the
FluentAdapter
itself.- Returns:
- instance of fluent adapter
-
reset
public void reset()Resets all properties of this container. -
getControlContainer
Provide control container across different classes.- Returns:
- control container instance.
-
setConfigClass
Sets config class - needed to enable annotation configuration.- Parameters:
clazz
- class annotated with@RunWith(Cucumber.class)
-
injector
Injector used inFluentObjectFactory
for creating instances.- Returns:
- fluent injector without loaded full FluentControl context
-
instantiatePages
Instantiates@Page
annotated fields in the provided container class, if it has any.The container class is most likely a subclass of
FluentCucumberTest
.- Parameters:
obj
- container object which contains pages to initialize- See Also:
-