Ejemplo n.º 1
0
 def test_should_subtract_attack_power_amount_from_health(self, mock_unit):
     receiver = UnitBase()
     receiver.position = mock.Mock()
     receiver._health = 5
     mock_unit.return_value = receiver
     self.attack.perform()
     self.assertEqual(receiver.health, 2)
Ejemplo n.º 2
0
 def test_should_not_consider_unit_on_floor_if_no_position(self):
     unit = UnitBase()
     self.floor.add(unit, 0, 1, "north")
     unit.position = None
     self.assertEqual(self.floor.units, [])
Ejemplo n.º 3
0
 def test_should_not_consider_unit_on_floor_if_no_position(self):
     unit = UnitBase()
     self.floor.add(unit, 0, 1, "north")
     unit.position = None
     self.assertEqual(self.floor.units, [])