Class ConceptsTests
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.ConceptsTests
- Direct Known Subclasses:
LocalConceptsTests
Tests variability modeling concepts and reasoning.
- Author:
- Holger Eichelberger
-
Nested Class Summary
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
Fields 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 static voidaddAll(Collection<Object> result, Object value, boolean top) Adds all values invaluedepending on its type intoresult(may include nested structures if nottop).Creates the default result for mandatory tests (var = true).protected net.ssehub.easy.varModel.confModel.ConfigurationdoConceptTest(String modelName, boolean success, Map<String, Object> expected) Performs a concept test with reasoning.protected net.ssehub.easy.varModel.confModel.ConfigurationdoConceptTest(String modelName, Map<String, Object> expected) Performs a concept test with reasoning (must be valid and not conflicting).voidend()Unsets the IVML location on startup.private FileReturns the IVML folder withingetTestFolder().protected Filevoidstartup()Sets the IVML location on startup.voidTests a simple version of a mandatory variability with a single default variable.voidTests a simple version of a mandatory variability with a single default variable and constraint.voidTests a simple version of a mandatory variability with a single default variable and constraint in a typedef.voidTests a simple version of a mandatory variability with a single non-default variable and constraint.voidTests a simple version of a mandatory variability with a single non-default variable and constraint with staged assignment.voidTests a simple version of a mandatory variability with a single non-default variable and constraint in typedef with staged assignment.voidTests a simple version of a mandatory variability with a single non-default variable and constraint in a typedef.voidTests a simple version of a mandatory variability with a single non-default variable and (reversed) constraint.voidTests a simple version of a mandatory variability with a single non-default variable and (reversed) constraint with staged assignment.voidTests a simple version of a mandatory variability with a single non-default variable and two constraints.voidTests a simple version of a mandatory variability with a single non-default variable and two constraints in reverted order (compared to Mandatory5).voidTests a simple version of a multi selection over integers with a constraint.voidTests a simple version of a failing multi selection over integers with a constraint.voidTests a simple version of relevancies (disconnecting a tree).voidTests a simple version of relevancies (disconnecting a tree) via references.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
-
Constructor Details
-
ConceptsTests
public ConceptsTests()
-
-
Method Details
-
getTestFolder
- Specified by:
getTestFolderin classtest.de.uni_hildesheim.sse.vil.buildlang.AbstractTest<net.ssehub.easy.instantiation.core.model.buildlangModel.Script>
-
startup
public void startup() throws net.ssehub.easy.basics.modelManagement.ModelManagementExceptionSets the IVML location on startup.- Throws:
net.ssehub.easy.basics.modelManagement.ModelManagementException- shall not occur, leads to failure
-
end
public void end() throws net.ssehub.easy.basics.modelManagement.ModelManagementExceptionUnsets the IVML location on startup.- Throws:
net.ssehub.easy.basics.modelManagement.ModelManagementException- shall not occur, leads to failure
-
getIvmlFolder
Returns the IVML folder withingetTestFolder().- Returns:
- the IVML folder
-
testMandatory1
public void testMandatory1()Tests a simple version of a mandatory variability with a single default variable. -
testMandatory2
public void testMandatory2()Tests a simple version of a mandatory variability with a single default variable and constraint. -
testMandatory2t
public void testMandatory2t()Tests a simple version of a mandatory variability with a single default variable and constraint in a typedef. -
testMandatory3
public void testMandatory3()Tests a simple version of a mandatory variability with a single non-default variable and constraint. -
testMandatory3t
public void testMandatory3t()Tests a simple version of a mandatory variability with a single non-default variable and constraint in a typedef. -
testMandatory3s
public void testMandatory3s()Tests a simple version of a mandatory variability with a single non-default variable and constraint with staged assignment. -
testMandatory3st
public void testMandatory3st()Tests a simple version of a mandatory variability with a single non-default variable and constraint in typedef with staged assignment. -
testMandatory4
public void testMandatory4()Tests a simple version of a mandatory variability with a single non-default variable and (reversed) constraint. -
testMandatory4s
public void testMandatory4s()Tests a simple version of a mandatory variability with a single non-default variable and (reversed) constraint with staged assignment. -
testMandatory5
public void testMandatory5()Tests a simple version of a mandatory variability with a single non-default variable and two constraints. -
testMandatory6
public void testMandatory6()Tests a simple version of a mandatory variability with a single non-default variable and two constraints in reverted order (compared to Mandatory5). -
createDefaultMandatoryExpected
Creates the default result for mandatory tests (var = true).- Returns:
- the default result
-
testMultiSelect1
public void testMultiSelect1()Tests a simple version of a multi selection over integers with a constraint. -
testMultiSelect1fail
public void testMultiSelect1fail()Tests a simple version of a failing multi selection over integers with a constraint. -
testRelevancy1
public void testRelevancy1() throws net.ssehub.easy.varModel.model.ModelQueryExceptionTests a simple version of relevancies (disconnecting a tree).- Throws:
net.ssehub.easy.varModel.model.ModelQueryException- in case of a model query problem
-
testRelevancy2
public void testRelevancy2()Tests a simple version of relevancies (disconnecting a tree) via references. -
doConceptTest
protected net.ssehub.easy.varModel.confModel.Configuration doConceptTest(String modelName, Map<String, Object> expected) Performs a concept test with reasoning (must be valid and not conflicting).- Parameters:
modelName- the name of the model to testexpected- the expected values- Returns:
- the created configuration for further tests
-
doConceptTest
protected net.ssehub.easy.varModel.confModel.Configuration doConceptTest(String modelName, boolean success, Map<String, Object> expected) Performs a concept test with reasoning.- Parameters:
modelName- the name of the model to testsuccess- whether a success or a reasoning failure is expected (in the latter case theexpectedvalues are not tested)expected- the expected values (use nested variable names,NullValue.INSTANCEand null for not configured)- Returns:
- the created configuration for further tests
-
addAll
Adds all values invaluedepending on its type intoresult(may include nested structures if nottop).- Parameters:
result- the result to be modified as a side effectvalue- the value to addtop- whether this is a top-level call to this method (or a recursive call)
-