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 TestCashMethod() { var order = new CashSaleOrder(); var cart = new Cart(); Exception ex = Assert.ThrowsException <InsufficientInventoryException>(() => order.Checkout(cart, )); }