Enum Class FluentTestContainer

java.lang.Object
java.lang.Enum<FluentTestContainer>
io.fluentlenium.adapter.cucumber.FluentTestContainer
All Implemented Interfaces:
Serializable, Comparable<FluentTestContainer>, Constable

public enum FluentTestContainer extends Enum<FluentTestContainer>
Container class for FluentCucumberTest.

It uses Singleton pattern, based on enum, to make sure that all Cucumber steps use the same container.

  • Enum Constant Details

    • FLUENT_TEST

      public static final FluentTestContainer FLUENT_TEST
      Instance of FluentTestContainer.
  • Method Details

    • values

      public static FluentTestContainer[] 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

      public static FluentTestContainer valueOf (String name)
      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 name
      NullPointerException - if the argument is null
    • instance

      public FluentAdapter 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

      protected FluentControlContainer getControlContainer()
      Provide control container across different classes.
      Returns:
      control container instance.
    • setConfigClass

      public static void setConfigClass (Class clazz)
      Sets config class - needed to enable annotation configuration.
      Parameters:
      clazz - class annotated with @RunWith(Cucumber.class)
    • getSharedMutator

      protected SharedMutator getSharedMutator()
    • injector

      public FluentInjector injector()
      Injector used in FluentObjectFactory for creating instances.
      Returns:
      fluent injector without loaded full FluentControl context
    • instantiatePages

      public void instantiatePages (Object obj)
      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: