示例#1
0
def testSimpleCommandExecute():
    """CommandTest: Test SimpleCommand execute()"""
    vo = utils.command.SimpleCommandTestVO(5)
    note = puremvc_multicore.patterns.observer.Notification('SimpleCommandTestNote', vo)
    command = utils.command.SimpleCommandTestCommand()
    command.execute(note)
    eq_(vo.result, 10)
示例#2
0
def testMacroCommandExecute():
    """CommandTest: Test MacroCommand execute()"""
    vo = utils.command.MacroCommandTestVO(5)
    note = puremvc_multicore.patterns.observer.Notification('MacroCommandTest', vo)
    command = utils.command.MacroCommandTestCommand()
    command.execute(note)
    eq_(vo.result1, 10)
    eq_(vo.result2, 25)
示例#3
0
 	def testSimpleCommandExecute(self):
		"""CommandTest: Test SimpleCommand execute()"""

		vo = utils.command.SimpleCommandTestVO(5)
		note = puremvc.patterns.observer.Notification('SimpleCommandTestNote', vo)
		command = utils.command.SimpleCommandTestCommand()
		command.execute(note);

		self.assertEqual(True, vo.result == 10)
示例#4
0
	def testMacroCommandExecute(self):
		"""CommandTest: Test MacroCommand execute()"""
		
		vo = utils.command.MacroCommandTestVO(5)
		note = puremvc.patterns.observer.Notification('MacroCommandTest', vo)	
		command = utils.command.MacroCommandTestCommand()
		command.execute(note);
		
		self.assertEqual(True, vo.result1 == 10)
		self.assertEqual(True, vo.result2 == 25)