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>
net.ssehub.easy.producer.scenario_tests.AbstractScenarioTest
net.ssehub.easy.producer.scenario_tests.AbstractEasyScenarioTest
net.ssehub.easy.producer.scenario_tests.DynamicFreezeTest
Tests the
ProjectRewriteVisitor, whether it is able to freeze the QualiMaster model as expected.- Author:
- El-Sharkawy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classThis modifier is used to freeze all relevant declarations inside the CFG projects of Qualimaster.Nested classes/interfaces inherited from class net.ssehub.easy.producer.scenario_tests.AbstractScenarioTest
AbstractScenarioTest.ITestModifier, AbstractScenarioTest.MakeExecutableTestModifier, AbstractScenarioTest.ModeNested classes/interfaces inherited from class test.de.uni_hildesheim.sse.vil.buildlang.AbstractTest
test.de.uni_hildesheim.sse.vil.buildlang.AbstractTest.CleanerNested classes/interfaces inherited from class net.ssehub.easy.dslCore.test.AbstractTest
net.ssehub.easy.dslCore.test.AbstractTest.EqualitySetup<R extends net.ssehub.easy.basics.modelManagement.IModel> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Fileprivate static final Stringprivate final FileFields inherited from class net.ssehub.easy.producer.scenario_tests.AbstractScenarioTest
debug, DEFAULT_MODEL_PATHS, instantiate, MEASUREMENTS, modelPathsFields inherited from class net.ssehub.easy.dslCore.test.AbstractTest
OBSERVER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcompare(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.protected Fileprivate net.ssehub.easy.varModel.model.ProjectloadProject(File folder, String projectName, String version) Loads the specifiedProjectfrom thegetTestFolder()folder.voidTests whether theProjectRewriteVisitoris able addFreezeBlocks as it should be done in the QualiMaster tool.private StringtoString(net.ssehub.easy.varModel.model.Project project) Converts the given project to a String.Methods inherited from class net.ssehub.easy.producer.scenario_tests.AbstractEasyScenarioTest
getMeasurementFileNameMethods inherited from class net.ssehub.easy.producer.scenario_tests.AbstractScenarioTest
assertConfiguration, configureExecution, createReasoner, createTestConfigurer, executeCase, executeCase, executeCase, executeCase, furtherInitialization, getIvmlFolderIn, getMeasurements, getTracerFactory, getVilFolderIn, getVtlFolderIn, initializeReasoner, obtainIvmlModelMethods inherited from class test.de.uni_hildesheim.sse.vil.buildlang.AbstractTest
addTestDataLocations, assertEqual, assertEqual, assertExecutor, assertFailure, assertFailure, assertOutdated, cleanTemp, copyFile, createFile, createTempDir, deleteQuietly, getSystemPropertyName, getTempDir, getTestConfigurer, getTestDataDir, registerTypeAnyway, testExecutorMethods inherited from class net.ssehub.easy.dslCore.test.AbstractTest
assertNamingAndVersion, checkEqualsAndPrepareMessage, checkEqualsAndPrepareMessage, checkEqualsAndPrint, checkEqualsAndPrint, checkErrorCodes, checkErrorCodes, checkWarnings, determineTestDataDir, file2String, isEqual, resourceInitialization, toString
-
Field Details
-
PROJECT_OBSERVABLESCFG
- See Also:
-
testdataDir
-
expectedModelDir
-
-
Constructor Details
-
DynamicFreezeTest
public DynamicFreezeTest()
-
-
Method Details
-
getTestFolder
- Specified by:
getTestFolderin classtest.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 specifiedProjectfrom thegetTestFolder()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 theProjectRewriteVisitoris able addFreezeBlocks 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 theProjectRewriteVisitor).expected- The expected project, loaded fromexpectedModelDir.done- The list of already tested modified projects, should be empty when called from outside.
-
toString
Converts the given project to a String.- Parameters:
project- The project to convert, must not benull.- Returns:
- The parseable string version of the project.
-