diff --git a/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java b/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java index e7e42e9..d0229f4 100644 --- a/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java +++ b/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java @@ -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"); + } }