コード例 #1
0
ファイル: ObstacleTest.java プロジェクト: Scotow/HappyBird
 @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);
 }
コード例 #2
0
ファイル: ObstacleTest.java プロジェクト: Scotow/HappyBird
 @Test
 public void testGetHealth() throws Exception {
   Obstacle o = new Circle(new Coordinates(0, 0));
   assertTrue(o.getHealth() == Obstacle.MAX_HEALTH);
 }