Class ConnectorsAasTest

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

public class ConnectorsAasTest extends test.de.iip_ecosphere.platform.support.aas.TestWithPlugin
Tests the connectors AAS.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • ConnectorsAasTest

      public ConnectorsAasTest()
  • Method Details

    • printOut

      private void printOut(de.iip_ecosphere.platform.support.aas.Aas aas)
      Print the AAS to the console.
      Parameters:
      aas - the AAS to print
    • testAas

      public void testAas() throws IOException
      Tests the connectors AAS.
      Throws:
      IOException - shall not occur
    • createConnector1Instance

      Creates an instance of ConnectorsAasTest.Connector1.
      Returns:
      the instance
    • createConnector2Instance

      Creates an instance of ConnectorsAasTest.Connector1.
      Returns:
      the instance
    • testDescriptorsSubmodel

      private void testDescriptorsSubmodel(de.iip_ecosphere.platform.support.aas.Aas aas)
      Tests the connector descriptors in their sub model.
      Parameters:
      aas - the AAS to inspect
    • assertBooleanProperty

      private static void assertBooleanProperty(boolean expected, de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec, String propertyName) throws ExecutionException
      Asserts a boolean property on a sub-model element collection.
      Parameters:
      expected - the expected value
      sec - the sub-model element collection
      propertyName - the property name
      Throws:
      ExecutionException - in case that the property cannot be read
    • assertStringProperty

      private static void assertStringProperty(String expected, de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec, String propertyName) throws ExecutionException
      Asserts a String property on a sub-model element collection.
      Parameters:
      expected - the expected value
      sec - the sub-model element collection
      propertyName - the property name
      Throws:
      ExecutionException - in case that the property cannot be read
    • assertReferenceElement

      private static void assertReferenceElement(boolean hasRef, de.iip_ecosphere.platform.support.aas.SubmodelElementCollection sec, String propertyName) throws ExecutionException
      Asserts a reference element.
      Parameters:
      hasRef - whether there shall be a reference value
      sec - the sub-model element collection
      propertyName - the property name
      Throws:
      ExecutionException - in case that the property cannot be read
    • testActiveDescriptors

      private void testActiveDescriptors(List<de.iip_ecosphere.platform.connectors.Connector<?,?,?,?>> connectors, int expectedActive) throws IOException
      Tests the connector descriptors in their sub-model. As we operate on a deployed modified AAS, it is important to retrieve a new one.
      Parameters:
      connectors - all connectors instantiated for this test, active an non-active
      expectedActive - the expected number of connectors in the active sub-model
      Throws:
      IOException - shall not occur