Browse Source

Added control_to_EPN to test

Yentl Van Tendeloo 8 years ago
parent
commit
35561d3bbe
2 changed files with 33 additions and 3 deletions
  1. 31 1
      integration/test_powerwindow.py
  2. 2 2
      models/pm_req_analyse.mvc

+ 31 - 1
integration/test_powerwindow.py

@@ -161,6 +161,14 @@ class TestPowerWindow(unittest.TestCase):
                     "",
                     "",
                     "plant_to_EPN",
                     "plant_to_EPN",
                     ] + get_model_constructor(open("models/plant_to_EPN.mvc", "r").read()) + [
                     ] + get_model_constructor(open("models/plant_to_EPN.mvc", "r").read()) + [
+                "transformation_add_MT",
+                    "All_RAM",
+                    "PW_Control",
+                    "",
+                    "Encapsulated_PetriNet",
+                    "",
+                    "control_to_EPN",
+                    ] + get_model_constructor(open("models/control_to_EPN.mvc", "r").read()) + [
                 "transformation_add_AL",
                 "transformation_add_AL",
                     "PetriNet",
                     "PetriNet",
                     "",
                     "",
@@ -230,6 +238,7 @@ class TestPowerWindow(unittest.TestCase):
                 "Destination name?",
                 "Destination name?",
                 "Instantiation successful!",
                 "Instantiation successful!",
                 "Please give your command.",
                 "Please give your command.",
+                "Ready for command...",
                 # transformation_RAMify
                 # transformation_RAMify
                 "Which metamodel do you want to RAMify?",
                 "Which metamodel do you want to RAMify?",
                 "Where do you want to store the RAMified metamodel?",
                 "Where do you want to store the RAMified metamodel?",
@@ -296,6 +305,27 @@ class TestPowerWindow(unittest.TestCase):
                 "Name of new transformation?",
                 "Name of new transformation?",
                 "Waiting for model constructors...",
                 "Waiting for model constructors...",
                 "Ready for command...",
                 "Ready for command...",
+                # transformation_add_MT
+                "RAMified metamodel to use?",
+                "Supported metamodels:",
+                set(["  PetriNet",
+                     "  Encapsulated_PetriNet",
+                     "  Network",
+                     "  Query",
+                     "  PW_Plant",
+                     "  PW_Environment",
+                     "  Requirements",
+                     "  PW_Control",
+                     "  ReachabilityGraph",
+                    ]),
+                "",
+                "Which ones do you want to use as source (empty string to finish)?",
+                "Model added as source",
+                "Which ones do you want to use as target (empty string to finish)?",
+                "Model added as target",
+                "Name of new transformation?",
+                "Waiting for model constructors...",
+                "Ready for command...",
                 # transformation_add_AL
                 # transformation_add_AL
                 "Which metamodels do you want to use as source for the action code (empty string to finish)?",
                 "Which metamodels do you want to use as source for the action code (empty string to finish)?",
                 "Model added as source",
                 "Model added as source",
@@ -324,7 +354,6 @@ class TestPowerWindow(unittest.TestCase):
                      "  Network : SimpleClassDiagrams",
                      "  Network : SimpleClassDiagrams",
                      "  Query : SimpleClassDiagrams",
                      "  Query : SimpleClassDiagrams",
                      "  reachability : ActionLanguage",
                      "  reachability : ActionLanguage",
-                     "  plant_to_EPN : All_RAM",
                      "  define_req : ManualOperation",
                      "  define_req : ManualOperation",
                      "  refine_plant : ManualOperation",
                      "  refine_plant : ManualOperation",
                      "  refine_control : ManualOperation",
                      "  refine_control : ManualOperation",
@@ -341,6 +370,7 @@ class TestPowerWindow(unittest.TestCase):
                      "  All_RAM : SimpleClassDiagrams",
                      "  All_RAM : SimpleClassDiagrams",
                      "  make_initial_models : All_RAM",
                      "  make_initial_models : All_RAM",
                      "  pm_powerwindow : ProcessModel",
                      "  pm_powerwindow : ProcessModel",
+                     "  plant_to_EPN : All_RAM",
                      "  environment_to_EPN : ActionLanguage",
                      "  environment_to_EPN : ActionLanguage",
                      "  control_to_EPN : All_RAM",
                      "  control_to_EPN : All_RAM",
                      "  ReachabilityGraph : SimpleClassDiagrams",
                      "  ReachabilityGraph : SimpleClassDiagrams",

+ 2 - 2
models/pm_req_analyse.mvc

@@ -142,7 +142,7 @@ ProcessModel analyse_requirements {
     Consumes (environment_model, refine_environment) {}
     Consumes (environment_model, refine_environment) {}
     Consumes (control_model, refine_control) {}
     Consumes (control_model, refine_control) {}
     Consumes (network, refine_network) {}
     Consumes (network, refine_network) {}
-    Consumes (query_model, refine_query) {}
+    Consumes (query, refine_query) {}
     Produces (refine_plant, plant_EPN) {}
     Produces (refine_plant, plant_EPN) {}
     Produces (refine_control, control_EPN) {}
     Produces (refine_control, control_EPN) {}
     Produces (refine_environment, environment_EPN) {}
     Produces (refine_environment, environment_EPN) {}
@@ -156,7 +156,7 @@ ProcessModel analyse_requirements {
     Produces (combine_EPN, pn) {}
     Produces (combine_EPN, pn) {}
 
 
     Consumes (pn, analyse) {}
     Consumes (pn, analyse) {}
-    Produces (analyses, reachability_graph) {}
+    Produces (analyse, reachability_graph) {}
 
 
     Consumes (reachability_graph, matches) {}
     Consumes (reachability_graph, matches) {}
     Consumes (query, matches) {}
     Consumes (query, matches) {}