public void SQLDeleteBookTest() { int count = db.GetBookCountByEntry(db.LookUpEntryIDByTitle("Pride and Prejudice")); int otherCount = db.GetBookCountByEntry(db.LookUpEntryIDByTitle("On the Bright Side")); db.DeleteBook(db.LookUpEntryIDByTitle("Pride and Prejudice")); db.DeleteBook(db.LookUpEntryIDByTitle("Pride and Prejudice")); db.SubmitToDatabase(); Assert.AreEqual(count - 2, db.GetBookCountByEntry(db.LookUpEntryIDByTitle("Pride and Prejudice"))); Assert.AreEqual(otherCount, db.GetBookCountByEntry(db.LookUpEntryIDByTitle("On the Bright Side"))); }
internal static void RemoveBookOfEntry(int entryId) { if (switchedOn) { db.DeleteBook(entryId); } }