public class ConnectorTest extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
ConnectorTest.ModelInputTranslator
Implements an input type translator for information-based tests.
|
private static class |
ConnectorTest.ModelOutputTranslator
Implements an output type translator for information-based tests.
|
private static class |
ConnectorTest.MyStruct
A simple struct for model-based connector tests.
|
| Modifier and Type | Field and Description |
|---|---|
private static de.iip_ecosphere.platform.support.aas.AasFactory |
original |
| Constructor and Description |
|---|
ConnectorTest() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertConnectorProperties(de.iip_ecosphere.platform.connectors.Connector<?,?,?,?> connector)
Tests the connector instance itself.
|
static void |
assertDescriptorRegistration(Class<? extends de.iip_ecosphere.platform.connectors.ConnectorDescriptor> cls)
Asserts the registration of
cls. |
static void |
assertInstance(de.iip_ecosphere.platform.connectors.Connector<?,?,?,?> connector,
boolean registered)
Checks the
ConnectorRegistry whether connector is registered or not. |
static void |
init()
Initializes this test.
|
static void |
shutdown()
Shuts down this test.
|
void |
testChannelConnector()
Tests the channel connector while reusing serializers.
|
void |
testConnectorParams()
Tests failing construction of connectors.
|
private void |
testModelConnector(boolean withEvents)
Tests the model connector.
|
void |
testModelConnectorWithEvents()
Tests the model connector with event-based ingestion.
|
void |
testModelConnectorWithPolling()
Tests the model connector with polling.
|
void |
testTopQName()
Tests
ModelAccess.iqName(String...) with a non-empty ModelAccess.topInstancesQName(). |
public static void init()
public static void shutdown()
public static void assertDescriptorRegistration(Class<? extends de.iip_ecosphere.platform.connectors.ConnectorDescriptor> cls)
cls.cls - the descriptor class to look for in ConnectorRegistrypublic static void assertInstance(de.iip_ecosphere.platform.connectors.Connector<?,?,?,?> connector,
boolean registered)
ConnectorRegistry whether connector is registered or not.connector - the connector to search forregistered - if true, fails if connector is not registered; if false, fails
if connector is registered,public static void assertConnectorProperties(de.iip_ecosphere.platform.connectors.Connector<?,?,?,?> connector)
connector - the connector instancepublic void testModelConnectorWithEvents()
throws IOException
IOException - shall not occurpublic void testModelConnectorWithPolling()
throws IOException
IOException - shall not occurpublic void testTopQName()
ModelAccess.iqName(String...) with a non-empty ModelAccess.topInstancesQName().private void testModelConnector(boolean withEvents)
throws IOException
withEvents - use events or pollingIOException - shall not occurpublic void testConnectorParams()
public void testChannelConnector()
throws IOException
IOException - shall not occurCopyright © 2022. All rights reserved.