From d0513fa2d342347379e7b758bd309f65c11df18b Mon Sep 17 00:00:00 2001 From: David Hermann Date: Tue, 7 Feb 2023 19:38:08 +0100 Subject: [PATCH] Edited output for quitCommand -> --- src/main/java/org/bitbiome/commands/QuitCommand.java | 3 ++- src/test/java/org/bitbiome/commands/QuitCommandTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bitbiome/commands/QuitCommand.java b/src/main/java/org/bitbiome/commands/QuitCommand.java index 258ab1a..b84f513 100644 --- a/src/main/java/org/bitbiome/commands/QuitCommand.java +++ b/src/main/java/org/bitbiome/commands/QuitCommand.java @@ -1,5 +1,6 @@ package org.bitbiome.commands; +import org.bitbiome.classes.Colors; import org.bitbiome.classes.TravelEngine; import java.util.Scanner; @@ -17,6 +18,6 @@ public class QuitCommand implements CommandAPI { } public static String getQuitMessage() { - return "You quitted!"; + return Colors.ANSI_BG_GREEN + "Du hast das Spiel beendet! Bis bald." + Colors.ANSI_RESET; } } diff --git a/src/test/java/org/bitbiome/commands/QuitCommandTest.java b/src/test/java/org/bitbiome/commands/QuitCommandTest.java index 67a368e..3dd4eaa 100755 --- a/src/test/java/org/bitbiome/commands/QuitCommandTest.java +++ b/src/test/java/org/bitbiome/commands/QuitCommandTest.java @@ -3,13 +3,14 @@ package org.bitbiome.commands; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; public class QuitCommandTest { @Test public void testQuitCommand() { - assertEquals("You quitted!", QuitCommand.getQuitMessage()); + assertTrue(QuitCommand.getQuitMessage().contains("Spiel beendet!")); } }