Class AbstractTransportConnectorTest
java.lang.Object
test.de.iip_ecosphere.platform.transport.AbstractTransportConnectorTest
Reusable test steps without referring to specific protocols.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classImplements a simple reception callback.static interfaceAllows to configure the transport parameters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertProduct(Product expected, AbstractTransportConnectorTest.Callback received) Asserts thatexpectedand the received value incallbackcontain the same values.static voiddoTest(de.iip_ecosphere.platform.support.ServerAddress addr, Class<? extends de.iip_ecosphere.platform.transport.serialization.Serializer<Product>> serializerType) Implements the test using theTransportFactory.static voiddoTest(de.iip_ecosphere.platform.support.ServerAddress addr, Class<? extends de.iip_ecosphere.platform.transport.serialization.Serializer<Product>> serializerType, AbstractTransportConnectorTest.TransportParameterConfigurer configurer) Implements the test using theTransportFactory.voidTestsAbstractTransportConnector.applyAuthenticationKey(String, de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector.AuthenticationConsumer).
-
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 theTransportFactory.- Parameters:
addr- the server addressserializerType- 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 theTransportFactory.- Parameters:
addr- the server addressserializerType- the serializer type to useconfigurer- 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 thatexpectedand the received value incallbackcontain the same values.- Parameters:
expected- expected valuereceived- received value
-
testApplyAuthenticationKey
public void testApplyAuthenticationKey()TestsAbstractTransportConnector.applyAuthenticationKey(String, de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector.AuthenticationConsumer).
-