public void AddBook() { Model.Book book = new Model.Book(); book = TestHelper.initBook(); SQLDAL.Book target = new SQLDAL.Book(); bool actual = target.AddBook(book); bool expected = true; Assert.AreEqual(expected, actual); }
public void DeleteBook() { Model.Book book = new Model.Book(); book = TestHelper.initBook(); book.Id = book.Id + "TEST"; //先添加这本书 SQLDAL.Book target = new SQLDAL.Book(); bool actual = target.AddBook(book); bool expected = true; Assert.AreEqual(expected, actual); //删除这本书 bool actual_2 = target.DeleteBook(book); bool expected_2 = true; Assert.AreEqual(expected_2, actual_2); }