Class Helper

java.lang.Object
com.adaptris.tester.runtime.helpers.Helper
All Implemented Interfaces:
Closeable, AutoCloseable

public abstract class Helper extends Object implements Closeable
Abstract class for helper implementation.

Helper is concept that allows you to start up service to use during tests, for example: WireMock.

  • Constructor Details

    • Helper

      public Helper()
  • Method Details

    • init

      public abstract void init(ServiceTestConfig config) throws ServiceTestException
      Implementations initialise service so its usable in tests, all properties for connectivity should also be set using addHelperProperty(String, String).
      Parameters:
      config - The service tester config
      Throws:
      ServiceTestException
    • getHelperProperties

      public Map<String,String> getHelperProperties()
      Helper properties should be set during initialisation, they are resolved in the service config.

      Useful if you use something like the DynamicPortProvider to set a services port

      Returns:
      Map of helper properties added.
    • addHelperProperty

      public void addHelperProperty(String key, String value)
      Adds properties to helper properties, they are resolved in the service config.

      Useful if you use something like the DynamicPortProvider to set a services port

      Parameters:
      key - Helper property key
      value - Helper property value