def test_attributes(self): m = MapElement("Name", "Element") m.set_attribs({"TestKey": "TestValue"}) test_attibutes = m.attribs() test_attribute = test_attibutes['TestKey'] self.assertEqual("TestValue", test_attribute)
def test_has_action_not_found(self): m = MapElement("Name", "Element") engine = ProcessingEngine() engine.add_action("TestOne", m) self.assertEqual(False, engine.has_action("TestTwo"))
def test_add_action_not_found(self): m = MapElement("Name", "Element") engine = ProcessingEngine() engine.add_action("TestOne", m) if 'TestTwo' not in engine._actions: self.assertEqual(True, True)
def test_constructor(self): m = MapElement("Name", "Element") self.assertEqual("Name", m.name()) self.assertEqual("Element", m.element_class())
def test_no(self): m = MapElement("Name", "Element") m.set_no_element("AnElement") self.assertEqual("AnElement", m.no_action())
def test_yes(self): m = MapElement("Name", "Element") m.set_yes_element("AnElement") self.assertEqual("AnElement", m.yes_action())
def test_set_type(self): m = MapElement("Name", "Element") m.set_element_type("Decision") self.assertEqual("Decision", m._el_type)