From fbae51a7169051b6174f5721a0f71d56c1296bb0 Mon Sep 17 00:00:00 2001 From: Juliakn66 <117075450+Juliakn66@users.noreply.github.com> Date: Sat, 4 Feb 2023 14:14:24 +0100 Subject: [PATCH] unittest: added testGetItemsOutputWithoutItems() --- .../org/bitbiome/commands/LookaroundCommandTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java b/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java index ac1a1d2..e109a94 100644 --- a/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java +++ b/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java @@ -81,4 +81,14 @@ public class LookaroundCommandTest { String expectedOutput = "Huch, was liegt denn hier rum?\n- Holz\n- Stein\n- Sand\nSchnell, sammel es ein!\n"; assertEquals(expectedOutput, outputMessage.toString()); } + @Test + public void testGetItemsOutputWithoutItems() { + LookaroundCommand command = new LookaroundCommand(); + int randomNumberItems = 0; + StringBuilder outputMessage = new StringBuilder(); + ArrayList foundItems = new ArrayList(); + command.getItemsOutput(randomNumberItems, outputMessage, foundItems); + String expectedOutput = "Hier gibt es leider nichts für dich zum Einsammeln.\n"; + assertEquals(expectedOutput, outputMessage.toString()); + } }