Class GenericMessageBinderTest

java.lang.Object
test.de.iip_ecosphere.platform.transport.spring.binder.generic.GenericMessageBinderTest
Direct Known Subclasses:
GenericMessageBinderGlobalTest, GenericMessageBinderTlsTest

@SpringBootTest @TestPropertySource(locations="classpath:test.properties") @ContextConfiguration(initializers=Initializer.class) public class GenericMessageBinderTest extends Object
Test class for the message binder. This class uses the application configuration from transport.spring! Binder name is explicitly configured in test.properties as spring.cloud.stream.defaultBinder in order to test for a correct binder name.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An initializer to override certain configuration values, in particular dynamic ports.
    static class 
    A simple test processor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static de.iip_ecosphere.platform.support.ServerAddress
     
    private de.iip_ecosphere.platform.transport.connectors.TransportParameter
     
    private static String
     
    private static boolean
     
    private static File
     
    private static test.de.iip_ecosphere.platform.test.amqp.qpid.TestQpidServer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static String
    Returns the keystore key if secCfg is set.
    static void
    Initializes the test by starting an embedded AMQP server and by sending back received results on the output stream to the "input2" stream.
    protected static de.iip_ecosphere.platform.support.ServerAddress
    Rests the broker address.
    protected static void
    setRelyOnGlobal(boolean global)
    Rely on global transport rather than an own connector.
    protected static void
    setSecCfg(File folder)
    Defines the secure config folder.
    static void
    Shuts down client and test server.
    void
    Testing.

    Methods inherited from class java.lang.Object

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

    • addr

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

      private static test.de.iip_ecosphere.platform.test.amqp.qpid.TestQpidServer server
    • received

      private static String received
    • secCfg

      private static File secCfg
    • relyOnGlobal

      private static boolean relyOnGlobal
    • params

      @Autowired private de.iip_ecosphere.platform.transport.connectors.TransportParameter params
  • Constructor Details

    • GenericMessageBinderTest

      public GenericMessageBinderTest()
  • Method Details

    • setSecCfg

      protected static void setSecCfg(File folder)
      Defines the secure config folder.
      Parameters:
      folder - the folder, used instead of the default config folder if not null
    • setRelyOnGlobal

      protected static void setRelyOnGlobal(boolean global)
      Rely on global transport rather than an own connector.
      Parameters:
      global - use global or local
    • getKeystoreKey

      protected static String getKeystoreKey()
      Returns the keystore key if secCfg is set.
      Returns:
      the keystore key, null if secCfg is null
    • resetAddr

      protected static de.iip_ecosphere.platform.support.ServerAddress resetAddr()
      Rests the broker address.
      Returns:
      the new broker address
    • init

      public static void init()
      Initializes the test by starting an embedded AMQP server and by sending back received results on the output stream to the "input2" stream. Requires the application configuration file "test.properties" in the test classpath with the username/password stated below.
    • shutdown

      public static void shutdown()
      Shuts down client and test server.
    • testMessages

      public void testMessages()
      Testing.