@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); }
@Test public void testGetHealth() throws Exception { Obstacle o = new Circle(new Coordinates(0, 0)); assertTrue(o.getHealth() == Obstacle.MAX_HEALTH); }