Class AbstractTransportConnectorTest

java.lang.Object
test.de.iip_ecosphere.platform.transport.AbstractTransportConnectorTest

public class AbstractTransportConnectorTest extends Object
Reusable test steps without referring to specific protocols.
Author:
Holger Eichelberger, SSE
  • Constructor Details

    • AbstractTransportConnectorTest

      public AbstractTransportConnectorTest()
  • Method Details

    • doTest

      public static void doTest(de.iip_ecosphere.platform.support.ServerAddress addr, Class<? extends de.iip_ecosphere.platform.transport.serialization.Serializer<Product>> serializerType) throws IOException
      Implements the test using the TransportFactory.
      Parameters:
      addr - the server address
      serializerType - the serializer type to use
      Throws:
      IOException - in case that connection/communication fails
    • doTest

      public static void doTest(de.iip_ecosphere.platform.support.ServerAddress addr, Class<? extends de.iip_ecosphere.platform.transport.serialization.Serializer<Product>> serializerType, AbstractTransportConnectorTest.TransportParameterConfigurer configurer) throws IOException
      Implements the test using the TransportFactory.
      Parameters:
      addr - the server address
      serializerType - the serializer type to use
      configurer - the optional transport parameter configurer (may be null)
      Throws:
      IOException - in case that connection/communication fails
    • assertProduct

      private static void assertProduct(Product expected, AbstractTransportConnectorTest.Callback received)
      Asserts that expected and the received value in callback contain the same values.
      Parameters:
      expected - expected value
      received - received value
    • testApplyAuthenticationKey

      public void testApplyAuthenticationKey()
      Tests AbstractTransportConnector.applyAuthenticationKey(String, de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector.AuthenticationConsumer).