浏览代码

Added control_to_EPN to test

Yentl Van Tendeloo 8 年之前
父节点
当前提交
35561d3bbe
共有 2 个文件被更改,包括 33 次插入3 次删除
  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",
                     ] + 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",
                     "PetriNet",
                     "",
@@ -230,6 +238,7 @@ class TestPowerWindow(unittest.TestCase):
                 "Destination name?",
                 "Instantiation successful!",
                 "Please give your command.",
+                "Ready for command...",
                 # transformation_RAMify
                 "Which metamodel do you want to RAMify?",
                 "Where do you want to store the RAMified metamodel?",
@@ -296,6 +305,27 @@ class TestPowerWindow(unittest.TestCase):
                 "Name of new transformation?",
                 "Waiting for model constructors...",
                 "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
                 "Which metamodels do you want to use as source for the action code (empty string to finish)?",
                 "Model added as source",
@@ -324,7 +354,6 @@ class TestPowerWindow(unittest.TestCase):
                      "  Network : SimpleClassDiagrams",
                      "  Query : SimpleClassDiagrams",
                      "  reachability : ActionLanguage",
-                     "  plant_to_EPN : All_RAM",
                      "  define_req : ManualOperation",
                      "  refine_plant : ManualOperation",
                      "  refine_control : ManualOperation",
@@ -341,6 +370,7 @@ class TestPowerWindow(unittest.TestCase):
                      "  All_RAM : SimpleClassDiagrams",
                      "  make_initial_models : All_RAM",
                      "  pm_powerwindow : ProcessModel",
+                     "  plant_to_EPN : All_RAM",
                      "  environment_to_EPN : ActionLanguage",
                      "  control_to_EPN : All_RAM",
                      "  ReachabilityGraph : SimpleClassDiagrams",

+ 2 - 2
models/pm_req_analyse.mvc

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