예제 #1
0
        public void UpdateBookAuthor()
        {
            Books book = new Books()
            {
                id = 106, 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.updateAuthor(book.id, "J.K.Rowling"));
            book = BookCRUD.getBook(book.id);
            Assert.AreEqual(book.author, "J.K.Rowling");
        }