public async Task RemoveFromPolicyTests_Pet() { Pet deletedPet; var pets = await _petProvider.GetAll(); var firstPet = pets.FirstOrDefault(); if (firstPet != null) { deletedPet = await _petProvider.Delete(firstPet.Id); } else { var pet = await _petProvider.Create( new Pet { Name = "ForDeleteFromProvider", BreedName = "German Shepherd", PetOwnerId = 1 }); pet.Archived.Should().Be(false); deletedPet = await _petProvider.Delete(pet.Id); } deletedPet.Archived.Should().Be(true); }
public async Task <IHttpActionResult> RemovePetFromPolicy(int id) { await _petProvider.Delete(id); return(Ok()); }