Class DynamicFreezeTest

java.lang.Object
net.ssehub.easy.dslCore.test.AbstractTest<net.ssehub.easy.instantiation.core.model.buildlangModel.Script>
test.de.uni_hildesheim.sse.vil.buildlang.AbstractTest<net.ssehub.easy.instantiation.core.model.buildlangModel.Script>

public class DynamicFreezeTest extends AbstractEasyScenarioTest
Tests the ProjectRewriteVisitor, whether it is able to freeze the QualiMaster model as expected.
Author:
El-Sharkawy
  • Field Details

    • PROJECT_OBSERVABLESCFG

      private static final String PROJECT_OBSERVABLESCFG
      See Also:
    • testdataDir

      private final File testdataDir
    • expectedModelDir

      private final File expectedModelDir
  • Constructor Details

    • DynamicFreezeTest

      public DynamicFreezeTest()
  • Method Details

    • getTestFolder

      protected File getTestFolder()
      Specified by:
      getTestFolder in class test.de.uni_hildesheim.sse.vil.buildlang.AbstractTest<net.ssehub.easy.instantiation.core.model.buildlangModel.Script>
    • loadProject

      private net.ssehub.easy.varModel.model.Project loadProject(File folder, String projectName, String version)
      Loads the specified Project from the getTestFolder() folder.
      Parameters:
      folder - The main folder from where to load the project structure, e.g., getTestFolder().
      projectName - The name of the main project to load.
      version - Optional: the version of the project to load (only numbers, without an preceding v).
      Returns:
      The specified project, loaded from the getTestFolder().
    • testDynamicFreeze

      public void testDynamicFreeze()
      Tests whether the ProjectRewriteVisitor is able add FreezeBlocks as it should be done in the QualiMaster tool.
    • compare

      private void compare(net.ssehub.easy.varModel.model.Project actual, net.ssehub.easy.varModel.model.Project expected, Set<net.ssehub.easy.varModel.model.Project> done)
      Recursive method for comparing the modified project with the expected project.
      Parameters:
      actual - The modified project (which was changed by the ProjectRewriteVisitor).
      expected - The expected project, loaded from expectedModelDir.
      done - The list of already tested modified projects, should be empty when called from outside.
    • toString

      private String toString(net.ssehub.easy.varModel.model.Project project)
      Converts the given project to a String.
      Parameters:
      project - The project to convert, must not be null.
      Returns:
      The parseable string version of the project.