Class ConnectorTest

java.lang.Object
test.de.iip_ecosphere.platform.connectors.ConnectorTest

public class ConnectorTest extends Object
Tests the defined classes through fake connectors.
Author:
Holger Eichelberger, SSE
  • 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 of cls.
      Parameters:
      cls - the descriptor class to look for in ConnectorRegistry
    • assertInstance

      public static void assertInstance(de.iip_ecosphere.platform.connectors.Connector<?,?,?,?> connector, boolean registered)
      Checks the ConnectorRegistry whether connector is registered or not.
      Parameters:
      connector - the connector to search for
      registered - if true, fails if connector is not registered; if false, fails if connector is registered,
    • assertConnectorProperties

      public static void assertConnectorProperties(de.iip_ecosphere.platform.connectors.Connector<?,?,?,?> connector)
      Tests the connector instance itself.
      Parameters:
      connector - the connector instance
    • testModelConnectorWithEvents

      public void testModelConnectorWithEvents() throws IOException
      Tests the model connector with event-based ingestion.
      Throws:
      IOException - shall not occur
    • testModelConnectorWithPolling

      public void testModelConnectorWithPolling() throws IOException
      Tests the model connector with polling.
      Throws:
      IOException - shall not occur
    • testTopQName

      public void testTopQName()
      Tests ModelAccess.iqName(String...) with a non-empty ModelAccess.topInstancesQName().
    • testModelConnector

      private void testModelConnector(boolean withEvents) throws IOException
      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

      public void testChannelConnector() throws IOException
      Tests the channel connector while reusing serializers.
      Throws:
      IOException - shall not occur