public void SQLDeleteTest() { int count = db.GetCatalogLength(); db.DeleteCatalogEntry(db.LookUpEntryIDByTitle("Harry Potter and the Philosopher's Stone")); db.SubmitToDatabase(); Assert.AreEqual(count - 1, db.GetCatalogLength()); }
public static Entry NewEntry() { int index = db.InsertCatalogEntry("", "", true); if (!switchedOn) { db.DeleteCatalogEntry(index); } return(new Entry() { Index = index, Author = "", Title = "", BookCount = 0 }); }