def testConstructor(): """NotificationTest: Test Constructor""" note = Notification('TestNote', 5, 'TestNoteType') eq_(note.get_name(), 'TestNote') eq_(note.get_body(), 5) eq_(note.get_type(), 'TestNoteType')
def testRegisterAndExecuteCommand(self): """ControllerTest: Test register_command() and execute_command()""" controller = Controller('test') controller.register_command('ControllerTest', utils.controller.ControllerTestCommand) vo = utils.controller.ControllerTestVO(12) note = Notification('ControllerTest', vo) controller.execute_command(note) self.assertEqual(True, vo.result == 24 )
def testBodyAccessors(): """NotificationTest: Test Body Accessors""" note = Notification(None) note.set_body(5) eq_(note.get_body(), 5)
def testNameAccessors(): """NotificationTest: Test Name Accessors""" note = Notification('TestNote') eq_(note.get_name(), 'TestNote')
def __init__(self, anme, body): Notification.__init__(self, ViewTestNote.NAME, body)