Class ConnectorServiceWrapperTest

java.lang.Object
test.de.iip_ecosphere.platform.services.environment.ConnectorServiceWrapperTest

public class ConnectorServiceWrapperTest extends Object
Tests the ConnectorServiceWrapper and MockingConnectorServiceWrapper.
Author:
Holger Eichelberger, SSE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private de.iip_ecosphere.platform.connectors.types.TranslatingProtocolAdapter<Object,Object,Object,Object>
    Returns a connector adapter that literally does nothing, just for testing.
    private de.iip_ecosphere.platform.services.environment.YamlService
    Returns a YAML service for testing.
    void
    Tests the MockingConnectorServiceWrapper.
    private <O, I, CO, CI>
    void
    testStopWrapper(de.iip_ecosphere.platform.services.environment.ConnectorServiceWrapper<O,I,CO,CI> wrapper)
    Generic stopping test for a wrapper instance.
    void
    Tests the ConnectorServiceWrapper.
    private <O, I, CO, CI>
    void
    testWrapper(de.iip_ecosphere.platform.services.environment.ConnectorServiceWrapper<O,I,CO,CI> wrapper, de.iip_ecosphere.platform.services.environment.YamlService yaml)
    Generic test for a wrapper instance based on the constituting yaml instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConnectorServiceWrapperTest

      public ConnectorServiceWrapperTest()
  • Method Details

    • testWrapper

      public void testWrapper() throws ExecutionException
      Tests the ConnectorServiceWrapper.
      Throws:
      ExecutionException - shall not occur in successful tests
    • testMockingWrapper

      public void testMockingWrapper() throws ExecutionException
      Tests the MockingConnectorServiceWrapper.
      Throws:
      ExecutionException - shall not occur in successful tests
    • getYamlService

      private de.iip_ecosphere.platform.services.environment.YamlService getYamlService()
      Returns a YAML service for testing.
      Returns:
      the YAML instance
    • createConnectorAdapter

      private de.iip_ecosphere.platform.connectors.types.TranslatingProtocolAdapter<Object,Object,Object,Object> createConnectorAdapter()
      Returns a connector adapter that literally does nothing, just for testing.
      Returns:
      the connector adapter
    • testWrapper

      private <O, I, CO, CI> void testWrapper(de.iip_ecosphere.platform.services.environment.ConnectorServiceWrapper<O,I,CO,CI> wrapper, de.iip_ecosphere.platform.services.environment.YamlService yaml) throws ExecutionException
      Generic test for a wrapper instance based on the constituting yaml instance. The wrapper is started but not stopped.
      Type Parameters:
      O - the output type from the underlying machine/platform
      I - the input type to the underlying machine/platform
      CO - the output type of the connector
      CI - the input type of the connector
      Parameters:
      wrapper - the wrapper instance to be tested
      yaml - the service deployment information
      Throws:
      ExecutionException - shall not occur in successful tests#
      See Also:
    • testStopWrapper

      private <O, I, CO, CI> void testStopWrapper(de.iip_ecosphere.platform.services.environment.ConnectorServiceWrapper<O,I,CO,CI> wrapper) throws ExecutionException
      Generic stopping test for a wrapper instance.
      Type Parameters:
      O - the output type from the underlying machine/platform
      I - the input type to the underlying machine/platform
      CO - the output type of the connector
      CI - the input type of the connector
      Parameters:
      wrapper - the wrapper instance to be tested
      Throws:
      ExecutionException - shall not occur in successful tests#