db.deleteAll(firstUser);
}
@Test
public void testDeleteAll() throws WPISuiteException{
Data db = DataStore.getDataStore();
User[] arr = new User[2];
User firstUser = new User("Brian", "bgaffey", "password", 0);
db.save(firstUser);
User secondUser = new User("Gaffey", "gafftron", "password", 0);
db.save(secondUser);
List<User> retrievedList = db.retrieveAll(firstUser);
int initCount = retrievedList.size();
assertTrue(retrievedList.contains(firstUser));
assertTrue(retrievedList.contains(secondUser));
retrievedList = db.deleteAll(firstUser);
User me1 = db.retrieve(User.class, "username", "bgaffey").toArray(arr)[0];
User me2 = db.retrieve(User.class, "username", "gafftron").toArray(arr)[0];
assertEquals(initCount, retrievedList.size());
assertEquals(me1, null);
assertEquals(me2, null);
}