Class ConnectorTest
java.lang.Object
test.de.iip_ecosphere.platform.connectors.ConnectorTest
Tests the defined classes through fake connectors.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classImplements an input type translator for information-based tests.private static classImplements an output type translator for information-based tests.private static classA simple struct for model-based connector tests. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static de.iip_ecosphere.platform.support.aas.AasFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertConnectorProperties(de.iip_ecosphere.platform.connectors.Connector<?, ?, ?, ?> connector) Tests the connector instance itself.static voidassertDescriptorRegistration(Class<? extends de.iip_ecosphere.platform.connectors.ConnectorDescriptor> cls) Asserts the registration ofcls.static voidassertInstance(de.iip_ecosphere.platform.connectors.Connector<?, ?, ?, ?> connector, boolean registered) Checks theConnectorRegistrywhetherconnectorisregisteredor not.static voidinit()Initializes this test.static voidshutdown()Shuts down this test.voidTests the channel connector while reusing serializers.voidTests failing construction of connectors.private voidtestModelConnector(boolean withEvents) Tests the model connector.voidTests the model connector with event-based ingestion.voidTests the model connector with polling.voidTestsModelAccess.iqName(String...)with a non-emptyModelAccess.topInstancesQName().
-
Field Details
-
original
private static de.iip_ecosphere.platform.support.aas.AasFactory original
-
-
Constructor Details
-
ConnectorTest
public ConnectorTest()
-
-
Method Details
-
init
public static void init()Initializes this test. -
shutdown
public static void shutdown()Shuts down this test. -
assertDescriptorRegistration
public static void assertDescriptorRegistration(Class<? extends de.iip_ecosphere.platform.connectors.ConnectorDescriptor> cls) Asserts the registration ofcls.- Parameters:
cls- the descriptor class to look for inConnectorRegistry
-
assertInstance
public static void assertInstance(de.iip_ecosphere.platform.connectors.Connector<?, ?, ?, ?> connector, boolean registered) Checks theConnectorRegistrywhetherconnectorisregisteredor not.- Parameters:
connector- the connector to search forregistered- iftrue, fails ifconnectoris not registered; iffalse, fails ifconnectoris registered,
-
assertConnectorProperties
public static void assertConnectorProperties(de.iip_ecosphere.platform.connectors.Connector<?, ?, ?, ?> connector) Tests the connector instance itself.- Parameters:
connector- the connector instance
-
testModelConnectorWithEvents
Tests the model connector with event-based ingestion.- Throws:
IOException- shall not occur
-
testModelConnectorWithPolling
Tests the model connector with polling.- Throws:
IOException- shall not occur
-
testTopQName
public void testTopQName()TestsModelAccess.iqName(String...)with a non-emptyModelAccess.topInstancesQName(). -
testModelConnector
Tests the model connector.- Parameters:
withEvents- use events or polling- Throws:
IOException- shall not occur
-
testConnectorParams
public void testConnectorParams()Tests failing construction of connectors. -
testChannelConnector
Tests the channel connector while reusing serializers.- Throws:
IOException- shall not occur
-