Пример #1
0
        public void IsBookRemoved()
        {
            Book       book  = new Book();
            List <int> litId = (from iter in bookBusiness.GetAllBooks()
                                select iter.IdBook).ToList();

            mockBookRepository.Setup(x => x.DeleteBook(litId[0])).Returns(true);
            var result = bookBusiness.DeleteBook(litId[0]);

            Assert.IsTrue(result);
        }
Пример #2
0
 public IActionResult Delete(long id)
 {
     _IBookBusiness.DeleteBook(id);
     return(NoContent());
 }