示例#1
0
        public void UpdateBookType()
        {
            Books book = new Books()
            {
                id = 107, author = "Jane Austin", title = "Awesome book", type = "Classic", penaltyCost = 20, state = 1
            };

            Assert.IsTrue(BookCRUD.addBook(book.id, book.title, book.author, book.type, book.penaltyCost, DateTime.Today, (int)book.state));
            Assert.IsTrue(BookCRUD.updateType(book.id, "Fantasy"));
            book = BookCRUD.getBook(book.id);
            Assert.AreEqual(book.type, "Fantasy");
        }