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;
String expected = "\nSCORE: 100";
// act
vptu.Update();
String result = (String)vptu.GetOutput();
// assert
assertThat(result).startsWith("\nSCORE: 100");
assertThat(result).startsWith(expected);
}
@Test

Loading…
Cancel
Save