|
@@ -1538,3 +1538,94 @@ class TestModelverseCore(unittest.TestCase):
|
|
|
"OK",
|
|
|
"Ready for command...",
|
|
|
]))
|
|
|
+
|
|
|
+ def test_transform_add_MT_pn_reachability(self):
|
|
|
+ self.assertTrue(run_file(all_files,
|
|
|
+ [ "root", "root", "root",
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "PetriNets",
|
|
|
+ ] + get_model_constructor(open("integration/code/pn_design.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "ReachabilityGraph",
|
|
|
+ ] + get_model_constructor(open("integration/code/reachability_graph.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "PetriNets",
|
|
|
+ "my_pn",
|
|
|
+ ] + get_model_constructor(open("integration/code/pn_design_model_larger.mvc", "r").read()) + [
|
|
|
+ "model_list",
|
|
|
+ "transformation_add_AL",
|
|
|
+ "PetriNets",
|
|
|
+ "",
|
|
|
+ "ReachabilityGraph",
|
|
|
+ "",
|
|
|
+ "pn_reachability",
|
|
|
+ ] + get_constructor(open("integration/code/reachability.alc", "r").read()) + [
|
|
|
+ "transformation_execute",
|
|
|
+ "pn_reachability",
|
|
|
+ "my_pn",
|
|
|
+ "my_pn_reachability",
|
|
|
+ "model_list",
|
|
|
+ ],
|
|
|
+ [ # bootup phase
|
|
|
+ "Desired username for admin user?",
|
|
|
+ "Desired password for admin user?",
|
|
|
+ "Please repeat the password",
|
|
|
+ "Passwords match!",
|
|
|
+ "Welcome to the Model Management Interface v2.0!",
|
|
|
+ "Use the 'help' command for a list of possible commands",
|
|
|
+ "Ready for command...",
|
|
|
+ # model_add
|
|
|
+ "Creating new model!",
|
|
|
+ "Model type?",
|
|
|
+ "Model name?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Model upload success!",
|
|
|
+ "Ready for command...",
|
|
|
+ # model_add
|
|
|
+ "Creating new model!",
|
|
|
+ "Model type?",
|
|
|
+ "Model name?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Model upload success!",
|
|
|
+ "Ready for command...",
|
|
|
+ # model_add
|
|
|
+ "Creating new model!",
|
|
|
+ "Model type?",
|
|
|
+ "Model name?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Model upload success!",
|
|
|
+ "Ready for command...",
|
|
|
+ # model_list
|
|
|
+ set([" SimpleClassDiagrams : SimpleClassDiagrams",
|
|
|
+ " ActionLanguage : SimpleClassDiagrams",
|
|
|
+ " CoreFormalism : SimpleClassDiagrams",
|
|
|
+ " PetriNets : SimpleClassDiagrams",
|
|
|
+ " ReachabilityGraph : SimpleClassDiagrams",
|
|
|
+ " my_pn : PetriNets",
|
|
|
+ " core : CoreFormalism"]),
|
|
|
+ "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",
|
|
|
+ "Which metamodels do you want to use as target for the action code (empty string to finish)?",
|
|
|
+ "Model added as target",
|
|
|
+ "Name of Action Language model?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Ready for command...",
|
|
|
+ # transformation_execute (pn_reachability)
|
|
|
+ "Which transformation do you want to execute?",
|
|
|
+ "Which model to bind for source element PetriNets",
|
|
|
+ "Which model to create for target element ReachabilityGraph",
|
|
|
+ "Ready for command...",
|
|
|
+ # model_list
|
|
|
+ set([" SimpleClassDiagrams : SimpleClassDiagrams",
|
|
|
+ " ActionLanguage : SimpleClassDiagrams",
|
|
|
+ " CoreFormalism : SimpleClassDiagrams",
|
|
|
+ " PetriNets : SimpleClassDiagrams",
|
|
|
+ " my_pn_reachability : ReachabilityGraph",
|
|
|
+ " ReachabilityGraph : SimpleClassDiagrams",
|
|
|
+ " my_pn : PetriNets",
|
|
|
+ " core : CoreFormalism"]),
|
|
|
+ ]))
|