示例#1
0
 /** Test of the isAlive method */
 @Test
 public void testIsAlive() {
   assertTrue(monster.isAlive());
   monster.takeDamage(31);
   assertFalse(monster.isAlive());
 }
示例#2
0
 /** Test of the takeDamage method */
 @Test
 public void testTakeDamage() {
   monster.takeDamage(10);
   assertEquals(monster.getHealthPoint(), 20);
 }