public IActionResult DeleteConfirmed(int id) { var caminhao = _caminhaoService.GetById(id); _caminhaoService.Delete(caminhao); return(RedirectToAction(nameof(Index))); }
public async Task Delete_ShouldDelete() { //Arrange var id = Guid.NewGuid(); //Act await _caminhaoService.Delete(id); //Assert _caminhaoRepositoryMoq.Verify(v => v.Delete(id), Times.Once); }