diff --git a/src/test/java/tech/autodirect/api/database/TableCarsTest.java b/src/test/java/tech/autodirect/api/database/TableCarsTest.java index 133bcb3..8070bfa 100644 --- a/src/test/java/tech/autodirect/api/database/TableCarsTest.java +++ b/src/test/java/tech/autodirect/api/database/TableCarsTest.java @@ -21,7 +21,7 @@ class TableCarsTest { void testGetAllCars() { try {// Create new table for testUserId. setUpEach() ensures table doesn't already exist. TableCars table = new TableCars(dbName); - List> carMapsList = table.getAllCars(""); + List> carMapsList = table.getAllCars(); EntCar car1 = new EntCar(); car1.loadFromMap(new HashMap<>() { diff --git a/src/test/java/tech/autodirect/api/database/TableUsersTest.java b/src/test/java/tech/autodirect/api/database/TableUsersTest.java index faa8a9f..c7b7919 100644 --- a/src/test/java/tech/autodirect/api/database/TableUsersTest.java +++ b/src/test/java/tech/autodirect/api/database/TableUsersTest.java @@ -36,6 +36,7 @@ void removeUserByID() { @Test void userExists() { } + @BeforeEach public void setUpEach() { try { @@ -53,7 +54,9 @@ public void setUpEach() { public void tearDownAll() { try { tableUsers = new TableUsers(dbName); - tableUsers.removeUserByID(testUserId); + if (tableUsers.checkUserExists(testUserId)) { + tableUsers.removeUserByID(testUserId); + } } catch (SQLException | ClassNotFoundException e) { e.printStackTrace(); }