From 1cdca21f4fbb95cb1efe435c619252e6bbc1272f Mon Sep 17 00:00:00 2001 From: Juliakn66 <117075450+Juliakn66@users.noreply.github.com> Date: Sat, 4 Feb 2023 14:17:45 +0100 Subject: [PATCH] unittest: added testGetMobsOutputWithoutMobsAndItems() --- .../bitbiome/commands/LookaroundCommandTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java b/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java index cc0fa77..45f3887 100644 --- a/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java +++ b/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java @@ -106,4 +106,17 @@ public class LookaroundCommandTest { String expectedOutput = "Achtung, hier lauern Gefahren! Sei auf der Hut vor: \n- Big Foot\n- Yeti\n"; assertEquals(expectedOutput, outputMessage.toString()); } + @Test + public void testGetMobsOutputWithoutMobsAndItems() { + LookaroundCommand command = new LookaroundCommand(); + int randomNumberMobs = 0; + int randomNumberItems = 0; + StringBuilder outputMessage = new StringBuilder(); + ArrayList foundMobs = new ArrayList<>(); + + command.getMobsOutput(randomNumberMobs, randomNumberItems, outputMessage, foundMobs); + + String expectedOutput = "Hier gibt es sonst nichts weiter zu sehen. Reise weiter!\n"; + assertEquals(expectedOutput, outputMessage.toString()); + } }