|
@@ -91,3 +91,143 @@ class TestModelverseCore(unittest.TestCase):
|
|
|
" 200 root admin 53 core : CoreFormalism"]),
|
|
|
],
|
|
|
mode))
|
|
|
+
|
|
|
+ def test_po_model_empty_modify(self):
|
|
|
+ self.model_empty_modify("PO")
|
|
|
+
|
|
|
+ def model_empty_modify(self, mode):
|
|
|
+ self.assertTrue(run_file(all_files,
|
|
|
+ [ "root",
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "Empty",
|
|
|
+ "exit",
|
|
|
+ "model_list",
|
|
|
+ "model_list_full",
|
|
|
+ "model_modify",
|
|
|
+ "Empty",
|
|
|
+ "instantiate",
|
|
|
+ "Class",
|
|
|
+ "A",
|
|
|
+ "exit",
|
|
|
+ "model_list_full",
|
|
|
+ ],
|
|
|
+ [ "Desired username for admin user?",
|
|
|
+ "Welcome to the Model Management Interface v2.0!",
|
|
|
+ "Use the 'help' command for a list of possible commands",
|
|
|
+ "Ready for command...",
|
|
|
+ "Creating new model!",
|
|
|
+ "Model type?",
|
|
|
+ "Model name?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Model upload success!",
|
|
|
+ "Ready for command...",
|
|
|
+ set([" SimpleClassDiagrams : SimpleClassDiagrams",
|
|
|
+ " CoreFormalism : SimpleClassDiagrams",
|
|
|
+ " Empty : SimpleClassDiagrams",
|
|
|
+ " core : CoreFormalism"]),
|
|
|
+ "Ready for command...",
|
|
|
+ set([" 221 root admin 673 SimpleClassDiagrams : SimpleClassDiagrams",
|
|
|
+ " 221 root admin 86 CoreFormalism : SimpleClassDiagrams",
|
|
|
+ " 200 root nobody 0 Empty : SimpleClassDiagrams",
|
|
|
+ " 200 root admin 53 core : CoreFormalism"]),
|
|
|
+ "Ready for command...",
|
|
|
+ "Which model do you want to modify?",
|
|
|
+ "Model loaded, ready for commands!",
|
|
|
+ "Use 'help' command for a list of possible commands",
|
|
|
+ "Please give your command.",
|
|
|
+ "Type to instantiate?",
|
|
|
+ "Name of new element?",
|
|
|
+ "Instantiation successful!",
|
|
|
+ "Please give your command.",
|
|
|
+ "Ready for command...",
|
|
|
+ set([" 221 root admin 673 SimpleClassDiagrams : SimpleClassDiagrams",
|
|
|
+ " 221 root admin 86 CoreFormalism : SimpleClassDiagrams",
|
|
|
+ " 200 root nobody 1 Empty : SimpleClassDiagrams",
|
|
|
+ " 200 root admin 53 core : CoreFormalism"]),
|
|
|
+ "Ready for command...",
|
|
|
+ ],
|
|
|
+ mode))
|
|
|
+
|
|
|
+ def test_po_model_overwrite(self):
|
|
|
+ self.model_overwrite("PO")
|
|
|
+
|
|
|
+ def model_overwrite(self, mode):
|
|
|
+ self.assertTrue(run_file(all_files,
|
|
|
+ [ "root",
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "Empty",
|
|
|
+ "exit",
|
|
|
+ "model_list_full",
|
|
|
+ "model_modify",
|
|
|
+ "Empty",
|
|
|
+ "instantiate",
|
|
|
+ "Class",
|
|
|
+ "A",
|
|
|
+ "exit",
|
|
|
+ "model_list_full",
|
|
|
+ "model_overwrite",
|
|
|
+ "Empty",
|
|
|
+ "instantiate_node",
|
|
|
+ "Class",
|
|
|
+ "B",
|
|
|
+ "instantiate_node",
|
|
|
+ "Class",
|
|
|
+ "C",
|
|
|
+ "exit",
|
|
|
+ "model_list_full",
|
|
|
+ "model_modify",
|
|
|
+ "Empty",
|
|
|
+ "list",
|
|
|
+ "exit",
|
|
|
+ ],
|
|
|
+ [ "Desired username for admin user?",
|
|
|
+ "Welcome to the Model Management Interface v2.0!",
|
|
|
+ "Use the 'help' command for a list of possible commands",
|
|
|
+ "Ready for command...",
|
|
|
+ "Creating new model!",
|
|
|
+ "Model type?",
|
|
|
+ "Model name?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Model upload success!",
|
|
|
+ "Ready for command...",
|
|
|
+ set([" 221 root admin 673 SimpleClassDiagrams : SimpleClassDiagrams",
|
|
|
+ " 221 root admin 86 CoreFormalism : SimpleClassDiagrams",
|
|
|
+ " 200 root nobody 0 Empty : SimpleClassDiagrams",
|
|
|
+ " 200 root admin 53 core : CoreFormalism"]),
|
|
|
+ "Ready for command...",
|
|
|
+ "Which model do you want to modify?",
|
|
|
+ "Model loaded, ready for commands!",
|
|
|
+ "Use 'help' command for a list of possible commands",
|
|
|
+ "Please give your command.",
|
|
|
+ "Type to instantiate?",
|
|
|
+ "Name of new element?",
|
|
|
+ "Instantiation successful!",
|
|
|
+ "Please give your command.",
|
|
|
+ "Ready for command...",
|
|
|
+ set([" 221 root admin 673 SimpleClassDiagrams : SimpleClassDiagrams",
|
|
|
+ " 221 root admin 86 CoreFormalism : SimpleClassDiagrams",
|
|
|
+ " 200 root nobody 1 Empty : SimpleClassDiagrams",
|
|
|
+ " 200 root admin 53 core : CoreFormalism"]),
|
|
|
+ "Ready for command...",
|
|
|
+ "Which model to overwrite?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Model overwrite success!",
|
|
|
+ "Ready for command...",
|
|
|
+ set([" 221 root admin 673 SimpleClassDiagrams : SimpleClassDiagrams",
|
|
|
+ " 221 root admin 86 CoreFormalism : SimpleClassDiagrams",
|
|
|
+ " 200 root nobody 2 Empty : SimpleClassDiagrams",
|
|
|
+ " 200 root admin 53 core : CoreFormalism"]),
|
|
|
+ "Ready for command...",
|
|
|
+ "Which model do you want to modify?",
|
|
|
+ "Model loaded, ready for commands!",
|
|
|
+ "Use 'help' command for a list of possible commands",
|
|
|
+ "Please give your command.",
|
|
|
+ "List of all elements:",
|
|
|
+ set([" B : Class",
|
|
|
+ " C : Class"]),
|
|
|
+ "Please give your command.",
|
|
|
+ "Ready for command...",
|
|
|
+ ],
|
|
|
+ mode))
|