Class AbstractIvmlTests.TestConfigurer

java.lang.Object
de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
test.de.iip_ecosphere.platform.configuration.easyProducer.AbstractIvmlTests.TestConfigurer
Enclosing class:
AbstractIvmlTests

public static class AbstractIvmlTests.TestConfigurer extends de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
Reusable test configuration/setup.
Author:
Holger Eichelberger, SSE
  • Field Details

    • ivmlMetaModelFolder

      private File ivmlMetaModelFolder
    • additionalIvmlFolders

      private List<File> additionalIvmlFolders
    • exit

      private boolean exit
  • Constructor Details

    • TestConfigurer

      public TestConfigurer(String ivmlModelName, File modelFolder, File outputFolder)
      Creates a configurer instance. Copies the IVML configuration meta model to target/ivml and filters out the configuration templates. Uses that folder to load the model from. If the parent of modelFolder contains a folder named common (reusable, shared parts of tests), that folder is added as additional IVML folder to EASy setup and considered while loading the IVML meta model.
      Parameters:
      ivmlModelName - the name of the IVML model representing the topmost platform configuration
      modelFolder - the folder where the model is located (ignored if null)
      outputFolder - the output folder for code generation
    • TestConfigurer

      public TestConfigurer(String[] args)
      Creates a configurer instance from command line arguments delivered by toArgs(boolean).
      Parameters:
      args - the command line arguments
  • Method Details

    • getMainClass

      public String getMainClass()
      Overrides:
      getMainClass in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
    • inTesting

      public boolean inTesting()
      Overrides:
      inTesting in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
    • toArgs

      public String[] toArgs(boolean all)
      Overrides:
      toArgs in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
    • setStartRuleName

      public de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer setStartRuleName(String startRuleName)
      Overrides:
      setStartRuleName in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
    • obtainLifecycleDescriptor

      public de.iip_ecosphere.platform.configuration.easyProducer.ConfigurationLifecycleDescriptor obtainLifecycleDescriptor()
      Obtains the lifecycle descriptor.
      Overrides:
      obtainLifecycleDescriptor in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
      Returns:
      the descriptor
    • validateConfiguration

      protected void validateConfiguration(net.ssehub.easy.varModel.confModel.Configuration conf) throws ExecutionException
      Overrides:
      validateConfiguration in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
      Throws:
      ExecutionException
    • validateReasoningResult

      protected void validateReasoningResult(net.ssehub.easy.reasoning.core.reasoner.ReasoningResult res) throws ExecutionException
      Overrides:
      validateReasoningResult in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
      Throws:
      ExecutionException
    • handleExecutionException

      protected void handleExecutionException(ExecutionException ex) throws ExecutionException
      Overrides:
      handleExecutionException in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
      Throws:
      ExecutionException
    • configure

      public void configure(de.iip_ecosphere.platform.configuration.easyProducer.ConfigurationSetup setup)
      Overrides:
      configure in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
    • setProperty

      public AbstractIvmlTests.TestConfigurer setProperty(String key, String value)
      Overrides:
      setProperty in class de.iip_ecosphere.platform.configuration.easyProducer.PlatformInstantiator.InstantiationConfigurer
    • getIvmlMetaModelFolder

      public File getIvmlMetaModelFolder()
      Returns the meta model folder. [for testing]
      Returns:
      the meta model folder (may be null for none)
    • getAdditionalIvmlFolders

      public List<File> getAdditionalIvmlFolders()
      Returns the additional IVML folders.
      Returns:
      the additional IVML folders (may be null for none)