示例#1
0
        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());
        }
示例#2
0
 public bool Delete(int ID)
 {
     return(EnvioService.Delete(ID));
 }
示例#3
0
 // DELETE api/envio/5
 public EnvioDTO Delete(int id)
 {
     return(_envioService.Delete(id));
 }