Browse Source

Edited output for quitCommand

<You quitted!> -> <Du hast das Spiel beendet! Bis bald.>
remotes/origin/develop
David Hermann 2 years ago
parent
commit
d0513fa2d3
  1. 3
      src/main/java/org/bitbiome/commands/QuitCommand.java
  2. 3
      src/test/java/org/bitbiome/commands/QuitCommandTest.java

3
src/main/java/org/bitbiome/commands/QuitCommand.java

@ -1,5 +1,6 @@
package org.bitbiome.commands; package org.bitbiome.commands;
import org.bitbiome.classes.Colors;
import org.bitbiome.classes.TravelEngine; import org.bitbiome.classes.TravelEngine;
import java.util.Scanner; import java.util.Scanner;
@ -17,6 +18,6 @@ public class QuitCommand implements CommandAPI {
} }
public static String getQuitMessage() { public static String getQuitMessage() {
return "You quitted!";
return Colors.ANSI_BG_GREEN + "Du hast das Spiel beendet! Bis bald." + Colors.ANSI_RESET;
} }
} }

3
src/test/java/org/bitbiome/commands/QuitCommandTest.java

@ -3,13 +3,14 @@ package org.bitbiome.commands;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class QuitCommandTest { public class QuitCommandTest {
@Test @Test
public void testQuitCommand() { public void testQuitCommand() {
assertEquals("You quitted!", QuitCommand.getQuitMessage());
assertTrue(QuitCommand.getQuitMessage().contains("Spiel beendet!"));
} }
} }
Loading…
Cancel
Save