Class DeploymentTest


  • public class DeploymentTest
    extends java.lang.Object
    Tests deployment scenarios.
    Author:
    Holger Eichelberger, SSE
    • Constructor Summary

      Constructors 
      Constructor Description
      DeploymentTest()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected de.iip_ecosphere.platform.support.Schema adaptRegistrySchema​(de.iip_ecosphere.platform.support.Schema schema)
      Adapts the registry schema if needed.
      private void assertProp​(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection coll)
      Asserts the expected value of a boolean property before/after change.
      private void assertProp2​(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection coll)
      Asserts the expected value of an umodifialbe integer property before/after change.
      private void assertRemoteAas​(de.iip_ecosphere.platform.support.Endpoint regEp, java.lang.String aasUrn, java.lang.String submName, java.lang.String smUrn, de.iip_ecosphere.platform.support.Endpoint aasEp)
      Asserts the remote AAS created by remoteAasDeploymentTest().
      void localDynamicSubmodelElementsCollectionDeployment()
      Tests a dynamically deployed/removed sub-model elements collection.
      void localDynamicSubmodelElementsCollectionPropertyDeployment()
      Tests a changed attribute value on a dynamically deployed sub-model elements collection.
      void localSubmodelDynamicDeployment()
      Tests a local dynamic sub-model deployment.
      void remoteAasDeploymentTest()
      Tests a remote AAS HTTP deployment.
      private void remoteAasDeploymentTestImpl​(de.iip_ecosphere.platform.support.Schema schema, de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore)
      Tests a remote AAS deployment.
      void remoteAasSslDeploymentTest()
      Tests a remote AAS HTTPS deployment.
      • Methods inherited from class java.lang.Object

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

      • DeploymentTest

        public DeploymentTest()
    • Method Detail

      • localSubmodelDynamicDeployment

        public void localSubmodelDynamicDeployment()
                                            throws java.io.IOException,
                                                   java.util.concurrent.ExecutionException
        Tests a local dynamic sub-model deployment.
        Throws:
        java.io.IOException - shall not occur if the test works
        java.util.concurrent.ExecutionException - shall not occur
      • localDynamicSubmodelElementsCollectionDeployment

        public void localDynamicSubmodelElementsCollectionDeployment()
                                                              throws java.io.IOException,
                                                                     java.util.concurrent.ExecutionException
        Tests a dynamically deployed/removed sub-model elements collection.
        Throws:
        java.io.IOException - shall not occur
        java.util.concurrent.ExecutionException - shall not occur
      • localDynamicSubmodelElementsCollectionPropertyDeployment

        public void localDynamicSubmodelElementsCollectionPropertyDeployment()
                                                                      throws java.io.IOException,
                                                                             java.util.concurrent.ExecutionException
        Tests a changed attribute value on a dynamically deployed sub-model elements collection. Does not work, similarly when creating the connectors component AAS.
        Throws:
        java.io.IOException - shall not occur
        java.util.concurrent.ExecutionException - shall not occur
      • assertProp

        private void assertProp​(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection coll)
                         throws java.util.concurrent.ExecutionException
        Asserts the expected value of a boolean property before/after change.
        Parameters:
        coll - the parent collection
        Throws:
        java.util.concurrent.ExecutionException - if access fails
      • assertProp2

        private void assertProp2​(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection coll)
                          throws java.util.concurrent.ExecutionException
        Asserts the expected value of an umodifialbe integer property before/after change.
        Parameters:
        coll - the parent collection
        Throws:
        java.util.concurrent.ExecutionException - if access fails
      • remoteAasDeploymentTest

        public void remoteAasDeploymentTest()
                                     throws java.io.IOException
        Tests a remote AAS HTTP deployment.
        Throws:
        java.io.IOException - shall not occur if the test works
      • remoteAasSslDeploymentTest

        public void remoteAasSslDeploymentTest()
                                        throws java.io.IOException
        Tests a remote AAS HTTPS deployment.
        Throws:
        java.io.IOException - shall not occur if the test works
      • adaptRegistrySchema

        protected de.iip_ecosphere.platform.support.Schema adaptRegistrySchema​(de.iip_ecosphere.platform.support.Schema schema)
        Adapts the registry schema if needed.
        Parameters:
        schema - the schema
        Returns:
        schema
      • remoteAasDeploymentTestImpl

        private void remoteAasDeploymentTestImpl​(de.iip_ecosphere.platform.support.Schema schema,
                                                 de.iip_ecosphere.platform.support.net.KeyStoreDescriptor kstore)
                                          throws java.io.IOException
        Tests a remote AAS deployment.
        Parameters:
        schema - the schema for the servers
        kstore - the key store descriptor, ignored if null
        Throws:
        java.io.IOException - shall not occur if the test works
      • assertRemoteAas

        private void assertRemoteAas​(de.iip_ecosphere.platform.support.Endpoint regEp,
                                     java.lang.String aasUrn,
                                     java.lang.String submName,
                                     java.lang.String smUrn,
                                     de.iip_ecosphere.platform.support.Endpoint aasEp)
                              throws java.io.IOException
        Asserts the remote AAS created by remoteAasDeploymentTest().
        Parameters:
        regEp - the registry endpoint
        aasUrn - the AAS URN
        submName - the name of the submodel to assert for
        smUrn - the submodel URN
        aasEp - the endpoint of the AAS server
        Throws:
        java.io.IOException - in case that obtaining the registry/receiving the AAS fails