12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- import unittest
- from utils import run_file, get_constructor, get_model_constructor
- all_files = [ "core/mini_modify.alc",
- "core/core_formalism.mvc",
- "core/core_algorithm.alc",
- "primitives.alc",
- "object_operations.alc",
- "conformance_scd.alc",
- "library.alc",
- "ftg.alc",
- "transform.alc",
- "model_management.alc",
- "ramify.alc",
- "metamodels.alc",
- "random.alc",
- "constructors.alc",
- "modelling.alc",
- "compilation_manager.alc",
- ]
- class TestModelverseCore(unittest.TestCase):
- def test_po_list(self):
- self.list("PO")
- def list(self, mode):
- self.assertTrue(run_file(all_files,
- [ "root",
- "model_list",
- ],
- [ "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...",
- set([" SimpleClassDiagrams : SimpleClassDiagrams",
- " CoreFormalism : SimpleClassDiagrams",
- " core : CoreFormalism"]),
- ],
- mode))
- def test_po_list_full(self):
- self.list_full("PO")
- def list_full(self, mode):
- self.assertTrue(run_file(all_files,
- [ "root",
- "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...",
- set([" 221 root admin 673 SimpleClassDiagrams : SimpleClassDiagrams",
- " 221 root admin 86 CoreFormalism : SimpleClassDiagrams",
- " 200 root admin 43 core : CoreFormalism"]),
- ],
- mode))
- def test_po_model_add_empty(self):
- self.model_add_empty("PO")
- def model_add_empty(self, mode):
- self.assertTrue(run_file(all_files,
- [ "root",
- "model_add",
- "SimpleClassDiagrams",
- "Empty",
- "exit",
- "model_list",
- "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"]),
- ],
- mode))
|