public void Delete_DeveChamarRepository() { var id = Guid.NewGuid(); _service.Delete(id); _repositoryMock.Verify(x => x.Delete(id), Times.Once); }
public void Contato_Remover_RemoveContato() { var guid = Guid.NewGuid(); _contatoService.Delete(guid); _contatoRepositoryMock.Verify(x => x.Delete(guid), Times.Once); }
public ActionResult Delete(Contato contato) { try { var contatoService = new ContatoService(); contatoService.Delete(contato); return(RedirectToAction("Index")); } catch { return(View()); } }