Beispiel #1
0
 /** Tests the length condition of the dropItems method */
 public void testDropItemsLengthZero() {
   monster =
       new Monster(
           "Troll2",
           "Tough ugly creature with tough rock like skin.",
           5,
           5,
           80,
           new UsableItem[0]);
   monster.dropItems(room);
   assertEquals("Items: \n", room.getItemsDescription());
 }
Beispiel #2
0
 /** Tests the true condition of the dropItems method */
 public void testDropItemsTrue() {
   monster.dropItems(room);
   assertEquals(
       "Items: Health Potion | Buckler | Club | Medallion | \n", room.getItemsDescription());
 }