Browse Source

refactoring: added expected variable to test

main
fdai7012 11 months ago
parent
commit
89d5383845
  1. 3
      src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java

3
src/test/java/pacmanTests/VisualizerPlainTextUltraTest.java

@ -117,12 +117,13 @@ class VisualizerPlainTextUltraTest {
gameManager.score = 100; gameManager.score = 100;
String expected = "\nSCORE: 100";
// act // act
vptu.Update(); vptu.Update();
String result = (String)vptu.GetOutput(); String result = (String)vptu.GetOutput();
// assert // assert
assertThat(result).startsWith("\nSCORE: 100");
assertThat(result).startsWith(expected);
} }
@Test @Test

Loading…
Cancel
Save