Ejemplo n.º 1
0
        public async Task CancelPolicyTest()
        {
            PetOwner deletedPetOwner;
            var      policy = await _petPolicyProvider.GetAll();

            var firstPolicy = policy.FirstOrDefault();

            if (firstPolicy != null)
            {
                deletedPetOwner = await _petPolicyProvider.Delete(firstPolicy.Id);
            }
            else
            {
                var petOwner = await _petPolicyProvider.Create(
                    new PetOwner
                {
                    Name           = "Test",
                    CountryIsoCode = "USA",
                    Email          = "test@test"
                });

                deletedPetOwner = await _petPolicyProvider.Delete(petOwner.Id);
            }
            deletedPetOwner.Archived.Should().Be(true);
        }
        public async Task <IHttpActionResult> DeletePetOwner(int id)
        {
            var result = await _policyProvider.Delete(id);

            return(Ok(result));
        }