Added Integration Tests for services table

This commit is contained in:
Mary Tran 2018-10-25 16:43:08 -04:00
parent d29b03972e
commit 97148737de
2 changed files with 94 additions and 1 deletions

View file

@ -309,6 +309,17 @@ public class DBHelper extends SQLiteOpenHelper {
new String[]{name}) > 0;
}
/**
* Looks in database for a service, and deletes the corresponding
* entry. Returns true if a user was deleted, false otherwise.
*
* @param service service of entry to delete
* @return whether the service was deleted
*/
public boolean deleteService(String service) {
return writeDB.delete(TABLE_SERVICES, COLUMN_SERVICE+" = ?",
new String[]{service}) > 0;
}
/**
* Returns a list of String arrays containing the service categories,