diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java index d448bb0..18ed2e6 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java @@ -230,10 +230,10 @@ public class DBHelper extends SQLiteOpenHelper { user[j] = cursor.getString(j); } listOfUsers.add(user); + cursor.moveToNext(); } } cursor.close(); return listOfUsers; } - } diff --git a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/DBIntegrationTest.java b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/DBIntegrationTest.java index 41fa25b..c9c1154 100644 --- a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/DBIntegrationTest.java +++ b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/DBIntegrationTest.java @@ -115,6 +115,10 @@ public class DBIntegrationTest { List allUsers = dbHelper.getAllUsers(); for (String[] user : allUsers){ +// for (String s : user){ +// System.out.print(s + " "); +// } +// System.out.println(); UserType usertype = dbHelper.findUserByUsername(user[0]); assertEquals(usertype.getFirstname(), user[1]); assertEquals(usertype.getLastname(), user[2]); @@ -123,5 +127,6 @@ public class DBIntegrationTest { dbHelper.deleteUser("jbO4aBF4dC"); } + }