From 4a955c29788f4dcb1c49c3aeb0c0684348791969 Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Fri, 25 Mar 2022 23:47:48 +0100 Subject: [PATCH] added small improvements in GameTest --- src/test/java/ch/zhaw/pm2/racetrack/GameTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java b/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java index 475e901..ba9f4a6 100644 --- a/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java +++ b/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java @@ -29,6 +29,9 @@ class GameTest { @DisplayName("Test correct Setup") class Setup { + /** + * Sets up getting the Config, Game and Userinterface for the following tests. + */ @BeforeEach void setup() { userInterface = new UserInterface("Test"); @@ -139,6 +142,9 @@ class GameTest { Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0)); } + /** + * Checks if car crash is set if a car crashes. + */ @Test void carCrash() { game.doCarTurn(PositionVector.Direction.UP); @@ -148,7 +154,7 @@ class GameTest { /** * This nested Class tests a play trough and implements a userInterface which pretends to be a real player. - * At the end of every Test the userinterface stays open for 10 more sec to visualize the game. + * At the end of every Test the user interface stays open for 10 more sec to visualize the game. */ @Nested @DisplayName("Playtrough") @@ -256,6 +262,7 @@ class GameTest { this.directions = directions; } + @Override public int selectOption(String text, List options) { pointerInstruction++; @@ -263,6 +270,7 @@ class GameTest { } + public void printInformation(String text) { }