Class ConfigurationTests

java.lang.Object
test.de.iip_ecosphere.platform.support.TestWithPlugin
test.de.iip_ecosphere.platform.support.aas.TestWithPlugin
test.de.iip_ecosphere.platform.transport.TestWithQpid
test.de.iip_ecosphere.platform.examples.ConfigurationTests

public class ConfigurationTests extends test.de.iip_ecosphere.platform.transport.TestWithQpid
Executes tests on runnable configuration.configuration examples.
Author:
Holger Eichelberger, SSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static de.iip_ecosphere.platform.support.ServerAddress
     
    private static final boolean
     
    private static de.iip_ecosphere.platform.support.Server
     
    private static final Consumer<String>
     

    Fields inherited from class test.de.iip_ecosphere.platform.transport.TestWithQpid

    qpid

    Fields inherited from class test.de.iip_ecosphere.platform.support.TestWithPlugin

    PROP_AAS_PLUGIN
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static final void
    assertContains(String output, String test)
    Asserts whether output contains test.
    private static final void
    assertMatches(String output, String regEx)
    Asserts whether output matches regEx.
    private static final void
    Configures the process builder pb for output handling depending on DEBUG.
    static void
    Stops the broker.
    static void
    Starts the broker.
    private void
    testInstantiatedExample(String folder, String appName, int stopTime, Consumer<String> asserter)
    Tests an instantiated example.
    void
    Tests the routing test from configuration.configuration.
    void
    Tests the simple mesh example from configuration.configuration.
    void
    Tests the simple mesh 3 example from configuration.configuration.

    Methods inherited from class test.de.iip_ecosphere.platform.transport.TestWithQpid

    addPlugin, fromPlugin, stopQpid

    Methods inherited from class test.de.iip_ecosphere.platform.support.aas.TestWithPlugin

    setAasPluginId, setup, setupAASPlugins

    Methods inherited from class test.de.iip_ecosphere.platform.support.TestWithPlugin

    addPluginLocation, addRunAfterLoading, clear, enableLocalPlugins, loadPlugins, setInstallDir

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • broker

      private static de.iip_ecosphere.platform.support.ServerAddress broker
    • server

      private static de.iip_ecosphere.platform.support.Server server
    • SIMPLE_RECEIVED_ASSERTER

      private static final Consumer<String> SIMPLE_RECEIVED_ASSERTER
    • DEBUG

      private static final boolean DEBUG
      See Also:
  • Constructor Details

    • ConfigurationTests

      public ConfigurationTests()
  • Method Details

    • configureProcess

      private static final void configureProcess(ProcessBuilder pb, File res)
      Configures the process builder pb for output handling depending on DEBUG.
      Parameters:
      pb - the process builder
      res - the file to redirect the output to if DEBUG is false.
    • assertContains

      private static final void assertContains(String output, String test)
      Asserts whether output contains test.
      Parameters:
      output - the output to test
      test - the test string to search within output
    • assertMatches

      private static final void assertMatches(String output, String regEx)
      Asserts whether output matches regEx.
      Parameters:
      output - the output to test
      regEx - the regular expression to match within output
    • startup

      public static void startup()
      Starts the broker.
    • shutdown

      public static void shutdown()
      Stops the broker.
    • testInstantiatedExample

      private void testInstantiatedExample(String folder, String appName, int stopTime, Consumer<String> asserter) throws IOException
      Tests an instantiated example.
      Parameters:
      folder - the example folder in gen
      appName - the app name/artifact name without version
      stopTime - the time to stop the application/test
      asserter - asserts on the output log
      Throws:
      IOException - if any I/O reading problem occurs
    • testSimpleMesh

      public void testSimpleMesh() throws IOException
      Tests the simple mesh example from configuration.configuration.
      Throws:
      IOException - if any I/O problem occurs
    • testSimpleMesh3

      public void testSimpleMesh3() throws IOException
      Tests the simple mesh 3 example from configuration.configuration.
      Throws:
      IOException - if any I/O problem occurs
    • testRoutingTest

      public void testRoutingTest() throws IOException
      Tests the routing test from configuration.configuration.
      Throws:
      IOException - if any I/O problem occurs