* Tests for baking multiple breads without naming them.
*/
@Test
public void testBakeMultipleWithoutName() {
final SpeakerNPC npc = getNPC("Erna");
final Engine en = npc.getEngine();
en.step(player, "hi");
assertTrue(npc.isTalking());
assertEquals(
"Welcome to the Semos bakery! We'll #bake fine bread for anyone who helps bring our #flour delivery from the mill.",
getReply(npc));
final StackableItem flour = new StackableItem("flour", "", "", null);
flour.setQuantity(6);
flour.setID(new ID(2, ZONE_NAME));
player.getSlot("bag").add(flour);
assertEquals(6, player.getNumberOfEquipped("flour"));
en.step(player, "make 3");
assertTrue(npc.isTalking());
assertEquals(
"I need you to fetch me 6 #'sacks of flour' for this job. Do you have it?",
getReply(npc));
en.step(player, "yes");
final String[] questStatus = player.getQuest(QUEST1).split(";");
final String[] expected = { "3", "bread", "" };
assertEquals("amount", expected[0], questStatus[0]);
assertEquals("item", expected[1], questStatus[1]);
assertTrue(npc.isTalking());
assertEquals(
"OK, I will bake 3 loaves of bread for you, but that will take some time. Please come back in 30 minutes.",
getReply(npc));
assertEquals(0, player.getNumberOfEquipped("flour"));
assertEquals(0, player.getNumberOfEquipped("bread"));
en.step(player, "bye");
assertFalse(npc.isTalking());
player.setQuest(QUEST1, "3;;0");
en.step(player, "hi");
assertEquals(
"Welcome back! I'm done with your order. Here you have 3 loaves of bread.",
getReply(npc));
assertEquals(3, player.getNumberOfEquipped("bread"));
}