public void PruebaParaValidarSiMascotaExiste() { var mascota = new Mascota(); var id = new int(); mascota = null; var mascotaDomainService = new MascotaDomainService(); var resultado = mascotaDomainService.GetMascotaDomainService(id, mascota); Assert.AreEqual("La mascota no existe.", resultado); }
public async Task <string> GetMascotaApplicationService(int id) { var mascota = await _baseDatos.Mascotas.Include(q => q.Refugio).FirstOrDefaultAsync(q => q.id == id); var respuestaDomainService = _mascotaDomainService.GetMascotaDomainService(id, mascota); bool hayErrorDomainService = respuestaDomainService != null; if (hayErrorDomainService) { return(respuestaDomainService); } return(null); }