Class AbstractComponentTest

java.lang.Object
org.codice.ddf.test.common.AbstractComponentTest

public abstract class AbstractComponentTest extends Object
Abstract base class for component tests. Extend to provide and implementation for the getApplicationOptions(PortFinder) methods and the test methods.

It is important to remember that the config() method and all the methods it calls, i.e., getContainerOptions() and getApplicationOptions(PortFinder), are called inside the test runner process and are only used to configure the test container. All the other methods in this class and its sub-classes will be run inside the test container, which is a separate process.

See Also:
  • Field Details

  • Constructor Details

    • AbstractComponentTest

      public AbstractComponentTest()
  • Method Details

    • config

      public org.ops4j.pax.exam.Option[] config()
      Configuration method called during Pax Exam configuration. The Options returned will be used by Pax Exam to configure the container that will be spawn and used to execute the tests.
      Returns:
      Pax Exam Option that will be used to configure the Pax Exam test container
    • getContainerOptions

      protected ContainerOptions getContainerOptions()
      Gets the object to use to configure the container.
      Returns:
      object that returns the container's configuration Options. Default implementation returns KarafOptions.
    • getApplicationOptions

      protected abstract ApplicationOptions getApplicationOptions(PortFinder portFinder)
      Gets the object to use to configure the component or application inside the container.
      Parameters:
      portFinder - reference to the PortFinder to use during the test container configuration
      Returns:
      object that returns the application's configuration Options