From badec0d16fedabca2ec584d1ea626026ae9d26d4 Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Thu, 24 Mar 2022 17:50:03 +0100 Subject: [PATCH] removed PositionVectorNotValidException.java --- .../ch/zhaw/pm2/racetrack/UserInterface.java | 1 - .../java/ch/zhaw/pm2/racetrack/GameTest.java | 16 ++++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/main/java/ch/zhaw/pm2/racetrack/UserInterface.java b/src/main/java/ch/zhaw/pm2/racetrack/UserInterface.java index b6c9e02..3ef450a 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/UserInterface.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/UserInterface.java @@ -25,7 +25,6 @@ public class UserInterface { public UserInterface(String welcomeText) { textIO = TextIoFactory.getTextIO(); textTerminal = textIO.getTextTerminal(); - textTerminal.println(welcomeText + "\n"); } diff --git a/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java b/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java index a956fac..4aca662 100644 --- a/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java +++ b/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java @@ -112,22 +112,14 @@ class GameTest { @Test void carTurnCorrect() { - try { - game.doCarTurn(RIGHT); - Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0)); - } catch (PositionVectorNotValidException positionVectorNotValidException) { - positionVectorNotValidException.printStackTrace(); - } + game.doCarTurn(RIGHT); + Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0)); } @Test void carCrash() { - try { - game.doCarTurn(PositionVector.Direction.UP); - Assertions.assertTrue(game.onlyOneCarLeft()); - } catch (PositionVectorNotValidException positionVectorNotValidException) { - positionVectorNotValidException.printStackTrace(); - } + game.doCarTurn(PositionVector.Direction.UP); + Assertions.assertTrue(game.onlyOneCarLeft()); } }