|
|
@ -67,4 +67,43 @@ class VisualizerPlainTextUltraTest { |
|
|
|
// assert |
|
|
|
assertThat(expected).isEqualTo(result); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void VisualizerPlainTextUtlra_pause_isVisualized() { |
|
|
|
// arrange |
|
|
|
String[] mapTest = { |
|
|
|
"w.w", |
|
|
|
"e.e", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w", |
|
|
|
"w.w" |
|
|
|
}; |
|
|
|
|
|
|
|
GameManager gameManager = new GameManager(); |
|
|
|
gameManager.map = new Map(mapTest, gameManager); |
|
|
|
VisualizerPlainTextUltra vptu = new VisualizerPlainTextUltra(gameManager); |
|
|
|
vptu.showScore = false; |
|
|
|
|
|
|
|
gameManager.Pause(); |
|
|
|
|
|
|
|
// act |
|
|
|
vptu.Update();; |
|
|
|
String result = (String)vptu.GetOutput(); |
|
|
|
|
|
|
|
System.out.println(result + "+"); |
|
|
|
|
|
|
|
// assert |
|
|
|
assertThat(result).endsWith(" Paused! \n\n"); |
|
|
|
} |
|
|
|
} |