/** Test of the isAlive method */ @Test public void testIsAlive() { assertTrue(monster.isAlive()); monster.takeDamage(31); assertFalse(monster.isAlive()); }
/** Test of the damageMonster method */ @Test public void testDamageMonster() { assertTrue(monster.damageMonster() <= (monster.getBaseDamage() + monster.getDamageRange())); }
/** Test of the takeDamage method */ @Test public void testTakeDamage() { monster.takeDamage(10); assertEquals(monster.getHealthPoint(), 20); }
/** Test of the getName method */ @Test public void testGetName() { assertEquals(monster.getName(), "Goblin"); }
/** Test of the getDamageRange method */ @Test public void testGetDamageRange() { assertEquals(monster.getDamageRange(), 3); }
/** Test of the getBaseDamage method */ @Test public void testGetBaseDamage() { assertEquals(monster.getBaseDamage(), 5); }
/** Test of the getHealthPoint method */ @Test public void testGetHealthPoint() { assertEquals(monster.getHealthPoint(), 30); }