public async Task <ServiceResponse> DeleteShelterDog(int dogId) { var repoResponse = await shelterDogRepository.DeleteShelterDog(dogId); var serviceResponse = mapper.Map <ServiceResponse>(repoResponse); if (!serviceResponse.Successful) { serviceResponse.StatusCode = StatusCodes.Status400BadRequest; } return(serviceResponse); }
public async void DeletingShelterDogClearsAllData() { var dog = await shelterDogRepository.AddShelterDog(GetValidShelterDog()); Assert.True(dog.Successful); var result = await shelterDogRepository.DeleteShelterDog(dog.Data.Id); Assert.True(result.Successful); dog = await shelterDogRepository.GetShelterDogDetails(dog.Data.Id); Assert.False(dog.Successful); }