public void DeleteEnvioTest() { _envioRepository.Setup(repo => repo.Delete(It.IsAny <long>())).Returns((long id) => { return(new EnvioDTO { EnvioId = id, DestinatarioId = 1, Estado = 2, FechaEntrega = DateTime.Now }); }); EnvioDTO deleted = sut.Delete(1); Assert.IsNotNull(deleted); _envioRepository.Verify(repo => repo.Delete(It.IsAny <long>()), Times.Once()); }
public bool Delete(int ID) { return(EnvioService.Delete(ID)); }
// DELETE api/envio/5 public EnvioDTO Delete(int id) { return(_envioService.Delete(id)); }