Exemple #1
0
        public void UpdateBook()
        {
            dynamic books;
            string  bookId;

            CreateBookHelper(out books, out bookId, authorId);
            var updateBook = ObjectMocks.GetBookForUpdate(authorId, bookId);

            _bookService.UpdateBook(updateBook);
            var updatedBook = _bookService.GetBook(bookId);

            Assert.Equal(updateBook.Title, updateBook.Title);
            DeleteBookHelper(bookId);
        }
Exemple #2
0
        public void UpdateBook()
        {
            string  authorId = _auRepo.GetAuthors().First().AuthorId;
            dynamic book     = null;
            string  bookId   = null;

            CreateBookHelper(out book, out bookId, authorId);
            var updateBook = ObjectMocks.GetBookForUpdate(authorId, bookId);

            _bkRepo.UpdateBook(updateBook);

            var updatedBook = _bkRepo.GetBook(bookId);

            Assert.Equal(updatedBook.Title, updateBook.Title);

            DeleteBookHelper(bookId);
        }