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