|
@@ -89,6 +89,10 @@ attr_add = ["Which model do you want to assign an attribute to?",
|
|
|
"Which attribute do you wish to assign?",
|
|
|
"Value of attribute?",
|
|
|
"Added attribute!"]
|
|
|
+attr_del = ["Which model do you want to remove an attribute of?",
|
|
|
+ "Which attribute do you want to delete?",
|
|
|
+ "Attribute deleted!",
|
|
|
+ ]
|
|
|
|
|
|
help_root = ["Currently no model is loaded, so your operations are limited to:",
|
|
|
" new -- Create a new model and save it for future use"
|
|
@@ -356,3 +360,24 @@ class TestPetrinetInterface(unittest.TestCase):
|
|
|
did_instantiate_simple + attr_add + prompt + ["Upper cardinality violation for outgoing edge at p1"] + prompt,
|
|
|
mode))
|
|
|
|
|
|
+ def test_po_pn_interface_verify_natural(self):
|
|
|
+ self.pn_interface_verify_natural("PO")
|
|
|
+
|
|
|
+ def test_co_pn_interface_verify_natural(self):
|
|
|
+ self.pn_interface_verify_natural("CO")
|
|
|
+
|
|
|
+ def pn_interface_verify_natural(self, mode):
|
|
|
+ self.assertTrue(run_file(all_files,
|
|
|
+ ["new", "PetriNets", "abc",
|
|
|
+ "instantiate", "Place", "p1",
|
|
|
+ "attr_add", "p1", "tokens", -5,
|
|
|
+ "attr_del", "p1", "tokens",
|
|
|
+ "attr_add", "p1", "tokens", 4,
|
|
|
+ "verify"],
|
|
|
+ init + new + loaded + \
|
|
|
+ instantiate_node + prompt + \
|
|
|
+ attr_add + prompt + \
|
|
|
+ attr_del + prompt + \
|
|
|
+ attr_add + prompt + \
|
|
|
+ ["OK"] + prompt,
|
|
|
+ mode))
|