public void NotFailWithNoItemsNotificationNoCreditCard()
        {
            var reservationService  = new FakeReserveInventory();
            var paymentService      = new FakePaymentProcessor();
            var notificationService = new FakeNotifyCustomer();
            var paymentDetails      = new PaymentDetails()
            {
                PaymentMethod = PaymentMethod.Cash
            };

            var cart  = new Cart();
            var order = new CashSaleOrder();

            bool shouldnotifycustomer = true;

            order.Checkout(shouldnotifycustomer);

            Assert.IsTrue(notificationService.wasCalled);
        }
        public void NotFailWithCreditCardReserveInventory()
        {
            var reservationService  = new FakeReserveInventory();
            var paymentService      = new FakePaymentProcessor();
            var notificationService = new FakeNotifyCustomer();
            var paymentDetails      = new PaymentDetails()
            {
                PaymentMethod = PaymentMethod.CreditCard
            };

            var cart  = new Cart();
            var order = new CreditCardSales(cart, paymentDetails, notificationService, reservationService, paymentService);

            bool shouldnotifycustomer = false;

            order.Checkout(shouldnotifycustomer);

            Assert.IsTrue(reservationService.wasCalled);
        }
        public void NotFailWithNoItemsNoNotificationCreditCard()
        {
            var reservationService  = new FakeReserveInventory();
            var paymentService      = new FakePaymentProcessor();
            var notificationService = new FakeNotifyCustomer();
            var paymentDetails      = new PaymentDetails()
            {
                PaymentMethod = PaymentMethod.CreditCard
            };

            var cart  = new Cart();
            var order = new OnlineSaleOrder();

            bool shouldnotifycustomer = false;

            order.Checkout(shouldnotifycustomer);

            Assert.IsTrue(paymentService.wasCalled);

            // if I got here, I guess it worked...
        }