public async Task WrappedDependency_TestCodeSeperateWithoutPolicies()
        {
            // setup
            var testCustomer = new CustomerModel()
            {
                CustomerId = 1,
                Email      = "*****@*****.**",
                FirstName  = "Test",
                LastName   = "Tester"
            };
            var mockRepository = new Mock <ICustomerRepository>();

            mockRepository.Setup(x => x.QueryCustomerById(It.IsAny <int>())).Returns(Task.FromResult(testCustomer));
            IAsyncPolicy <CustomerModel> mockPolicy = Policy.NoOpAsync <CustomerModel>();
            var classUnderTest = new CustomerService_Database(mockRepository.Object, mockPolicy);

            // act
            var customer = await classUnderTest.GetCustomerByIdAsync(1);

            // assert
            Assert.AreEqual(testCustomer.CustomerId, customer.CustomerId);
            Assert.AreEqual(testCustomer.FirstName, customer.FirstName);
            Assert.AreEqual(testCustomer.LastName, customer.LastName);
            Assert.AreEqual(testCustomer.Email, customer.Email);
        }
        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);
        }