public void MakePayment(IPaymentStrategy strategy) { foreach (Product product in products) { strategy.Pay(product); } }
public void CheckoutAsync_CallsPaymentStrategy_Always() { const string payment = "payment"; _paymentController.CheckoutAsync(payment); A.CallTo(() => _paymentStrategy.Pay(A <OrderDto> ._)).MustHaveHappenedOnceExactly(); }
public void MakePayment(IPaymentStrategy Wallet, IPaymentStrategy Paypal) { foreach (Product product in products) { if (!Wallet.Pay(product)) { Paypal.Pay(product); } else { System.Console.WriteLine("Al het geld is op ! :("); } } }
public void PayTShirt(TShirt shirt) { Console.OutputEncoding = System.Text.Encoding.UTF8; Console.WriteLine(); foreach (var variation in this.variations) { variation.Cost(shirt); Console.ForegroundColor = ConsoleColor.Magenta; System.Globalization.CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("it-IT"); Console.WriteLine($"TShirt cost after applying {variation.GetType().Name} is: {shirt.Price :C2}"); } Console.OutputEncoding = System.Text.Encoding.UTF8; Console.WriteLine(); Console.ForegroundColor = ConsoleColor.Cyan; System.Globalization.CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("it-IT"); Console.WriteLine($"Total Price: {shirt.Price :C2}"); paymentMethod.Pay(shirt.Price); Console.WriteLine(); Console.ForegroundColor = ConsoleColor.White; }
public double Pay(IPaymentStrategy strategy) { AmountPaid = strategy.Pay(GetPrice()); return(AmountPaid); }
public void Pay(double amount) { PaymentStrategy.Pay(amount); }
public void MakePayment(IPaymentStrategy paymentStrategy) { var totalPrice = GetTotalPrice(); paymentStrategy.Pay(totalPrice); }
public void Pay(IPaymentStrategy paymentMethod) { double amount = CalculateTotal(); paymentMethod.Pay(amount); }
public void Betal() { paymentStrategy.Pay(); }
public string executeStrategy() { return(_strategy.Pay()); }
public void Pay(int shopping_baskset) { var cost = _payment.Pay(shopping_baskset); Console.WriteLine("Cost of the T-Shirt(s): " + cost); }
public void Pay() { _strategy.Pay(); }
public ActionResult Pay(OrderViewModel order, Func <string, object, ViewResult> viewResult) { return(_payments.Pay(order, viewResult)); }
public void CheckOut(IPaymentStrategy paymentMethod) { Display(); paymentMethod.Pay(_totalAmount); GoodsList.Clear(); }