From ffca558531ea10966b05b71dc77916203b167139 Mon Sep 17 00:00:00 2001 From: David Hermann Date: Thu, 5 Jan 2023 21:07:36 +0100 Subject: [PATCH] unittest: Added unittest for the help command --- .../org/bitbiome/commands/HelpCommandTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/java/org/bitbiome/commands/HelpCommandTest.java diff --git a/src/test/java/org/bitbiome/commands/HelpCommandTest.java b/src/test/java/org/bitbiome/commands/HelpCommandTest.java new file mode 100644 index 0000000..75006ed --- /dev/null +++ b/src/test/java/org/bitbiome/commands/HelpCommandTest.java @@ -0,0 +1,15 @@ +package org.bitbiome.commands; + +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class HelpCommandTest { + + @Test + public void testHelpCommand() { + String helpMessage = HelpCommand.getHelpMessage(); + assertEquals("Hier ist eine Liste der Commands:\n- help -> Gibt diese Nachricht aus\n- exit/quit -> Beendet das Spiel\n", helpMessage); + } + + +}