From a9dd9a81238fb40a6e8d64612edb4ff1f0e2ff6d Mon Sep 17 00:00:00 2001 From: fdai7012 Date: Thu, 8 Feb 2024 15:01:21 +0100 Subject: [PATCH] refactoring: created variable for expected result --- src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java b/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java index 965c40c..50a9848 100644 --- a/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java +++ b/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java @@ -97,11 +97,13 @@ class VisualizerPlainTextUltraTest { gameManager.Pause(); + String expectedEnd = " Paused! \n\n"; + // act vptu.Update();; String result = (String)vptu.GetOutput(); // assert - assertThat(result).endsWith(" Paused! \n\n"); + assertThat(result).endsWith(expectedEnd); } }