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>
Direct Known Subclasses:
LocalConceptsTests

public class ConceptsTests extends AbstractEasyScenarioTest
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.Mode

    Nested classes/interfaces inherited from class test.de.uni_hildesheim.sse.vil.buildlang.AbstractTest

    test.de.uni_hildesheim.sse.vil.buildlang.AbstractTest.Cleaner

    Nested 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, modelPaths

    Fields inherited from class net.ssehub.easy.dslCore.test.AbstractTest

    OBSERVER
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static void
    addAll(Collection<Object> result, Object value, boolean top)
    Adds all values in value depending on its type into result (may include nested structures if not top).
    private Map<String,Object>
    Creates the default result for mandatory tests (var = true).
    protected net.ssehub.easy.varModel.confModel.Configuration
    doConceptTest(String modelName, boolean success, Map<String,Object> expected)
    Performs a concept test with reasoning.
    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).
    void
    end()
    Unsets the IVML location on startup.
    private File
    Returns the IVML folder within getTestFolder().
    protected File
     
    void
    Sets the IVML location on startup.
    void
    Tests a simple version of a mandatory variability with a single default variable.
    void
    Tests a simple version of a mandatory variability with a single default variable and constraint.
    void
    Tests a simple version of a mandatory variability with a single default variable and constraint in a typedef.
    void
    Tests a simple version of a mandatory variability with a single non-default variable and constraint.
    void
    Tests a simple version of a mandatory variability with a single non-default variable and constraint with staged assignment.
    void
    Tests a simple version of a mandatory variability with a single non-default variable and constraint in typedef with staged assignment.
    void
    Tests a simple version of a mandatory variability with a single non-default variable and constraint in a typedef.
    void
    Tests a simple version of a mandatory variability with a single non-default variable and (reversed) constraint.
    void
    Tests a simple version of a mandatory variability with a single non-default variable and (reversed) constraint with staged assignment.
    void
    Tests a simple version of a mandatory variability with a single non-default variable and two constraints.
    void
    Tests a simple version of a mandatory variability with a single non-default variable and two constraints in reverted order (compared to Mandatory5).
    void
    Tests a simple version of a multi selection over integers with a constraint.
    void
    Tests a simple version of a failing multi selection over integers with a constraint.
    void
    Tests a simple version of relevancies (disconnecting a tree).
    void
    Tests a simple version of relevancies (disconnecting a tree) via references.

    Methods inherited from class net.ssehub.easy.producer.scenario_tests.AbstractEasyScenarioTest

    getMeasurementFileName

    Methods 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, testExecutor

    Methods inherited from class net.ssehub.easy.dslCore.test.AbstractTest

    assertNamingAndVersion, checkEqualsAndPrepareMessage, checkEqualsAndPrepareMessage, checkEqualsAndPrint, checkEqualsAndPrint, checkErrorCodes, checkErrorCodes, checkWarnings, determineTestDataDir, file2String, isEqual, resourceInitialization, toString

    Methods inherited from class java.lang.Object

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

    • ConceptsTests

      public ConceptsTests()
  • 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>
    • startup

      public void startup() throws net.ssehub.easy.basics.modelManagement.ModelManagementException
      Sets 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.ModelManagementException
      Unsets the IVML location on startup.
      Throws:
      net.ssehub.easy.basics.modelManagement.ModelManagementException - shall not occur, leads to failure
    • getIvmlFolder

      private File getIvmlFolder()
      Returns the IVML folder within getTestFolder().
      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

      private Map<String,Object> 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.ModelQueryException
      Tests 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 test
      expected - 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 test
      success - whether a success or a reasoning failure is expected (in the latter case the expected values are not tested)
      expected - the expected values (use nested variable names, NullValue.INSTANCE and null for not configured)
      Returns:
      the created configuration for further tests
    • addAll

      private static void addAll(Collection<Object> result, Object value, boolean top)
      Adds all values in value depending on its type into result (may include nested structures if not top).
      Parameters:
      result - the result to be modified as a side effect
      value - the value to add
      top - whether this is a top-level call to this method (or a recursive call)