示例#1
0
        public void TestMethod_AddBook()
        {
            Book book = new Book
            {
                BookId = bookId,
                Author = "Khaled Hosseini",
                Title  = "The Kite Runner",
                Price  = 225000
            };
            BookRequest bookRequest = new BookRequest
            {
                OwnerAddress = sellerAddress,
                Book         = book
            };

            StoreController controller = new StoreController();
            var             response   = controller.AddBook(bookRequest);
            bool            successful = response.IsSuccessStatusCode;

            Assert.AreEqual(true, successful);
        }