removed PositionVectorNotValidException.java

This commit is contained in:
Andrin Fassbind 2022-03-24 17:50:03 +01:00
parent f6a16181cf
commit badec0d16f
2 changed files with 4 additions and 13 deletions

View File

@ -25,7 +25,6 @@ public class UserInterface {
public UserInterface(String welcomeText) { public UserInterface(String welcomeText) {
textIO = TextIoFactory.getTextIO(); textIO = TextIoFactory.getTextIO();
textTerminal = textIO.getTextTerminal(); textTerminal = textIO.getTextTerminal();
textTerminal.println(welcomeText + "\n"); textTerminal.println(welcomeText + "\n");
} }

View File

@ -112,22 +112,14 @@ class GameTest {
@Test @Test
void carTurnCorrect() { void carTurnCorrect() {
try { game.doCarTurn(RIGHT);
game.doCarTurn(RIGHT); Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0));
Assertions.assertEquals(new PositionVector(1, 0), game.getCarVelocity(0));
} catch (PositionVectorNotValidException positionVectorNotValidException) {
positionVectorNotValidException.printStackTrace();
}
} }
@Test @Test
void carCrash() { void carCrash() {
try { game.doCarTurn(PositionVector.Direction.UP);
game.doCarTurn(PositionVector.Direction.UP); Assertions.assertTrue(game.onlyOneCarLeft());
Assertions.assertTrue(game.onlyOneCarLeft());
} catch (PositionVectorNotValidException positionVectorNotValidException) {
positionVectorNotValidException.printStackTrace();
}
} }
} }