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); }
public IActionResult Delete(long id) { _IBookBusiness.DeleteBook(id); return(NoContent()); }