Exemple #1
0
class getPriority(unittest.TestCase):
    """ Test cases of getPriority """
    def setUp(self):
        """ Build the Attack Action """
        attack = AttackFactory.getAttackAsNew("TACKLE")
        self.priority = attack.speedDelegate.priority
        self.action = AttackAction(attack, None, None, None)

    def priorityIsCorrect(self):
        """ Test that the priority is returned correctly """
        assert self.action.getPriority(
        ) == self.priority, "Priority should be the priority of the attack provided"
class getPriority(unittest.TestCase):
    """ Test cases of getPriority """
    
    def  setUp(self):
        """ Build the Attack Action """
        attack = AttackFactory.getAttackAsNew("TACKLE")
        self.priority = attack.speedDelegate.priority
        self.action = AttackAction(attack, None, None, None)
        
    def priorityIsCorrect(self):
        """ Test that the priority is returned correctly """
        assert self.action.getPriority() == self.priority, "Priority should be the priority of the attack provided"