public async Task <ActionResult <ServiceViewModel> > GetService(string id) { Service service = await _servicesRepository.FindByIdAsync(id); if (service == null) { return(NotFound($"No existe ningún servicio con el código {id}.")); } return(_mapper.Map <ServiceViewModel>(service)); }
public async Task Search_Non_Existent_Service() { Service service = await _servicesRepository.FindByIdAsync("3333"); Assert.IsNull(service); }