public async Task WrappedDependency_TestPoliciesSeperateFromCode()
        {
            // setup
            var resiliencyPolicy = DemoPolicyFactory.GetCustomerDatabaseResiliencyPolicy();

            // act
            var sw = new Stopwatch();

            sw.Start();

            // simulate a slow call (should timeout and return default)
            var customer = await resiliencyPolicy.ExecuteAsync(async() =>
            {
                await Task.Delay(10000);
                return(new CustomerModel()
                {
                    CustomerId = 1,
                    FirstName = "Test",
                    LastName = "Tester",
                    Email = "*****@*****.**"
                });
            });

            // assert
            Assert.AreEqual("Customer Is Not Available.", customer.Message);
            Assert.IsTrue(sw.ElapsedMilliseconds < 10000);
        }
        public async Task WrappedDependency_TestPoliciesWithCode()
        {
            // setup
            var resiliencyPolicy = DemoPolicyFactory.GetCustomerDatabaseResiliencyPolicy();
            var classUnderTest   = new CustomerService_Database(new TestRepository(), resiliencyPolicy);

            // act
            var sw = new Stopwatch();

            sw.Start();
            var customer = await classUnderTest.GetCustomerByIdAsync(1);

            // assert
            Assert.AreEqual("Customer Is Not Available.", customer.Message);
            Assert.IsTrue(sw.ElapsedMilliseconds < 10000);
        }