Class ConnectorTest

java.lang.Object
test.de.iip_ecosphere.platform.support.TestWithPlugin
test.de.iip_ecosphere.platform.support.aas.TestWithPlugin
test.de.iip_ecosphere.platform.connectors.ConnectorTest

public class ConnectorTest extends test.de.iip_ecosphere.platform.support.aas.TestWithPlugin
Tests the defined classes through fake connectors.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static class 
    Implements an input type translator for information-based tests.
    private static class 
    Implements an output type translator for information-based tests.
    private static class 
    A simple struct for model-based connector tests.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static de.iip_ecosphere.platform.support.aas.AasFactory
     

    Fields inherited from class test.de.iip_ecosphere.platform.support.TestWithPlugin

    PROP_AAS_PLUGIN
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    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
    Initializes this test.
    static void
    Shuts down this test.
    void
    Tests the channel connector while reusing serializers.
    void
    Tests failing construction of connectors.
    private void
    testModelConnector(boolean withEvents)
    Tests the model connector.
    void
    Tests the model connector with event-based ingestion.
    void
    Tests the model connector with polling.
    void
    Tests ModelAccess.iqName(String...) with a non-empty ModelAccess.topInstancesQName().

    Methods inherited from class test.de.iip_ecosphere.platform.support.aas.TestWithPlugin

    setAasPluginId, setup, setupAASPlugins

    Methods inherited from class test.de.iip_ecosphere.platform.support.TestWithPlugin

    addPluginLocation, addPluginLocation, addPluginLocation, addRunAfterLoading, clear, enableLocalPlugins, loadPlugins, loadPlugins, setInstallDir

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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