From 113d4935945325895ad770902d0d18a590d07b99 Mon Sep 17 00:00:00 2001 From: Tanja Herche Date: Sun, 5 Feb 2023 15:13:53 +0100 Subject: [PATCH] Unittest: colored traveloption Winterlandmap --- src/main/java/org/bitbiome/commands/MapCommand.java | 4 ++-- .../java/org/bitbiome/commands/MapCommandTest.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/bitbiome/commands/MapCommand.java b/src/main/java/org/bitbiome/commands/MapCommand.java index 14952ff..27f00ca 100644 --- a/src/main/java/org/bitbiome/commands/MapCommand.java +++ b/src/main/java/org/bitbiome/commands/MapCommand.java @@ -101,12 +101,12 @@ public class MapCommand implements CommandAPI{ .append(" __________________________________________________________________________________________________\n") .append("| | | |\n") .append("| | | |\n") - .append("| " + Colors.ANSI_BLUE + locations.getJSONObject(5).getString("name") + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + locations.getJSONObject(4).getString("name") + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + locations.getJSONObject(2).getString("name") + Colors.ANSI_RESET + " |" + "\n") + .append("| " + Colors.ANSI_BRIGHT_BLACK + locations.getJSONObject(5).getString("name") + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + locations.getJSONObject(4).getString("name") + Colors.ANSI_RESET + " | " + Colors.ANSI_BRIGHT_BLACK + locations.getJSONObject(2).getString("name") + Colors.ANSI_RESET + " |" + "\n") .append("| | | |\n") .append("|________________________________|________________________________|________________________________|\n") .append("| | | |\n") .append("| | | |\n") - .append("| " + Colors.ANSI_BLUE + locations.getJSONObject(1).getString("name") + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + locations.getJSONObject(0).getString("name") + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + locations.getJSONObject(3).getString("name") + Colors.ANSI_RESET + " |" + "\n") + .append("| " + Colors.ANSI_BRIGHT_BLACK + locations.getJSONObject(1).getString("name") + Colors.ANSI_RESET + " | " + Colors.ANSI_BRIGHT_BLACK + locations.getJSONObject(0).getString("name") + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + locations.getJSONObject(3).getString("name") + Colors.ANSI_RESET + " |" + "\n") .append("| | | |\n") .append("|________________________________|________________________________|________________________________|\n"); } diff --git a/src/test/java/org/bitbiome/commands/MapCommandTest.java b/src/test/java/org/bitbiome/commands/MapCommandTest.java index 1eee876..67eb912 100644 --- a/src/test/java/org/bitbiome/commands/MapCommandTest.java +++ b/src/test/java/org/bitbiome/commands/MapCommandTest.java @@ -142,11 +142,11 @@ public class MapCommandTest { assertEquals(outputMessage.toString(), mapMessage); } @Test - public void testMapCommand() { + public void testWinterlandMapCommand() { Player Test = new Player("name"); TravelEngine outputtest = new TravelEngine(Test); - Location Winter = outputtest.getLocationByName("Winterland"); - outputtest.travelTo(Winter); + Location Winterland = outputtest.getLocationByName("Winterland"); + outputtest.travelTo(Winterland); String mapMessage = MapCommand.getMapMessage(outputtest); StringBuilder outputMessage = new StringBuilder(); outputMessage @@ -155,12 +155,12 @@ public class MapCommandTest { .append(" __________________________________________________________________________________________________\n") .append("| | | |\n") .append("| | | |\n") - .append("| " + Colors.ANSI_BLUE + "Wueste" + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + "Gruenland" + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + "Winterland" + Colors.ANSI_RESET + " |" + "\n") + .append("| " + Colors.ANSI_BRIGHT_BLACK + "Wueste" + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + "Gruenland" + Colors.ANSI_RESET + " | " + Colors.ANSI_BRIGHT_BLACK + "Winterland" + Colors.ANSI_RESET + " |" + "\n") .append("| | | |\n") .append("|________________________________|________________________________|________________________________|\n") .append("| | | |\n") .append("| | | |\n") - .append("| " + Colors.ANSI_BLUE + "Strand" + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + "Wald" + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + "Berge" + Colors.ANSI_RESET + " |" + "\n") + .append("| " + Colors.ANSI_BRIGHT_BLACK + "Strand" + Colors.ANSI_RESET + " | " + Colors.ANSI_BRIGHT_BLACK + "Wald" + Colors.ANSI_RESET + " | " + Colors.ANSI_BLUE + "Berge" + Colors.ANSI_RESET + " |" + "\n") .append("| | | |\n") .append("|________________________________|________________________________|________________________________|\n");