From 89d53838455c5bc5cb1f3af1ff3433a36b79b6ec Mon Sep 17 00:00:00 2001 From: fdai7012 Date: Thu, 8 Feb 2024 17:33:11 +0100 Subject: [PATCH] refactoring: added expected variable to test --- src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java b/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java index afbc632..0f2953c 100644 --- a/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java +++ b/src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java @@ -117,12 +117,13 @@ class VisualizerPlainTextUltraTest { gameManager.score = 100; + String expected = "\nSCORE: 100"; // act vptu.Update(); String result = (String)vptu.GetOutput(); // assert - assertThat(result).startsWith("\nSCORE: 100"); + assertThat(result).startsWith(expected); } @Test