public async void MarkingLostDogAsFoundSuccessfulForExistingDog() { var savedDogs = await lostDogRepository.GetLostDogs(new LostDogFilter(), null, 0, 10); Assert.True(savedDogs.Successful); Assert.NotEmpty(savedDogs.Data); var response = await lostDogRepository.MarkDogAsFound(savedDogs.Data.First().Id); Assert.True(response.Successful); }
public async Task <ServiceResponse> MarkLostDogAsFound(int dogId) { var repoResponse = await lostDogDataRepository.MarkDogAsFound(dogId); var serviceResponse = mapper.Map <RepositoryResponse, ServiceResponse>(repoResponse); if (!serviceResponse.Successful) { serviceResponse.StatusCode = StatusCodes.Status400BadRequest; } return(serviceResponse); }