Example #1
0
        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());
        }
Example #2
0
        public static Entry NewEntry()
        {
            int index = db.InsertCatalogEntry("", "", true);

            if (!switchedOn)
            {
                db.DeleteCatalogEntry(index);
            }
            return(new Entry()
            {
                Index = index,
                Author = "",
                Title = "",
                BookCount = 0
            });
        }