From dea430e418c1bf1aacec97bc766cfc0f996c5637 Mon Sep 17 00:00:00 2001 From: romanschenk37 <84532681+romanschenk37@users.noreply.github.com> Date: Mon, 7 Mar 2022 17:43:32 +0100 Subject: [PATCH] Added Test for Method getID in CarTest.java --- src/test/java/ch/zhaw/pm2/racetrack/CarTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/java/ch/zhaw/pm2/racetrack/CarTest.java b/src/test/java/ch/zhaw/pm2/racetrack/CarTest.java index 3468cbf..e8db6aa 100644 --- a/src/test/java/ch/zhaw/pm2/racetrack/CarTest.java +++ b/src/test/java/ch/zhaw/pm2/racetrack/CarTest.java @@ -21,13 +21,19 @@ class CarTest { // Default coordinates for tests int DEFAULT_X = 10; int DEFAULT_Y = 10; + char DEFAULT_ID = 'f'; /** * Create a new Car Object and set Position to a defined Default Position */ @BeforeEach void setUp() { - car = new Car('a', new PositionVector(DEFAULT_X, DEFAULT_Y)); + car = new Car(DEFAULT_ID, new PositionVector(DEFAULT_X, DEFAULT_Y)); + } + + @Test + void getID() { + assertEquals(DEFAULT_ID, car.getID()); } /**