public void Delete_CorrectId_CallsDeleteAndSave() { _sut = new ReviewClientService(_reviewClientRepositoryMock.Object, _unitOfWorkMock.Object, _userRepositoryMock.Object); _sut.Delete(int.MaxValue); _reviewClientRepositoryMock.Verify(m => m.Delete(It.IsAny <int>()), Times.Once); _unitOfWorkMock.Verify(m => m.SaveChanges(), Times.Once); }
public ActionResult Delete(int id) { _reviewClientService.Delete(id); return(RedirectToAction("Get")); }