From e05936efced13fd94f777a7986cf6d8d33a94e8f Mon Sep 17 00:00:00 2001 From: Juliakn66 <117075450+Juliakn66@users.noreply.github.com> Date: Mon, 6 Feb 2023 10:04:31 +0100 Subject: [PATCH] unittest: testUnknownLocationDescription() --- .../bitbiome/commands/LookaroundCommandTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java b/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java index acbdf56..f298900 100644 --- a/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java +++ b/src/test/java/org/bitbiome/commands/LookaroundCommandTest.java @@ -174,5 +174,19 @@ public class LookaroundCommandTest { assertEquals(expectedDescription, outputMessage.toString()); } + @Test + public void testUnknownLocationDescription() { + LookaroundCommand command = new LookaroundCommand(); + ArrayList enemies = new ArrayList(); + enemies.add(new Mob("unknown", false, 50,20)); + ArrayList items = new ArrayList(); + items.add(new Item("unknown",true, 10, 1)); + Location location = new Location("Unknown",enemies, items); + StringBuilder outputMessage = new StringBuilder(); + + command.getLocationDescription(location, outputMessage); + + assertEquals("", outputMessage.toString()); + } }