Esempio n. 1
0
 @Test
 public void testReduceHealth() throws Exception {
   Obstacle o = new Circle(new Coordinates(0, 0));
   int hp = o.getHealth();
   hp -= 30;
   o.reduceHealth(30);
   assertTrue(o.getHealth() == hp);
 }
Esempio n. 2
0
 @Test
 public void testGetHealth() throws Exception {
   Obstacle o = new Circle(new Coordinates(0, 0));
   assertTrue(o.getHealth() == Obstacle.MAX_HEALTH);
 }