|
@ -1,5 +1,7 @@ |
|
|
package org.bitbiome.commands; |
|
|
package org.bitbiome.commands; |
|
|
|
|
|
|
|
|
|
|
|
import org.bitbiome.classes.TravelEngine; |
|
|
|
|
|
import org.bitbiome.entities.Player; |
|
|
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; |
|
|
import static org.junit.jupiter.api.Assertions.assertTrue; |
|
@ -7,11 +9,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue; |
|
|
public class MapCommandTest { |
|
|
public class MapCommandTest { |
|
|
@Test |
|
|
@Test |
|
|
public void testMapCommand() { |
|
|
public void testMapCommand() { |
|
|
String mapMessage = MapCommand.getMapMessage(); |
|
|
|
|
|
|
|
|
Player Test = new Player("name"); |
|
|
|
|
|
TravelEngine outputtest = new TravelEngine(Test); |
|
|
|
|
|
String mapMessage = MapCommand.getMapMessage(outputtest); |
|
|
StringBuilder outputMessage = new StringBuilder(); |
|
|
StringBuilder outputMessage = new StringBuilder(); |
|
|
outputMessage |
|
|
outputMessage |
|
|
.append("Map:\n") |
|
|
.append("Map:\n") |
|
|
.append("Wueste Gruendland Winterland\n\n") |
|
|
|
|
|
|
|
|
.append("Wueste Gruenland Winterland\n\n") |
|
|
.append("Strand Wald Berge\n\n"); |
|
|
.append("Strand Wald Berge\n\n"); |
|
|
assertEquals(outputMessage.toString(), mapMessage); |
|
|
assertEquals(outputMessage.toString(), mapMessage); |
|
|
} |
|
|
} |
|
|