Exemplo n.º 1
0
        public void Purchase(string[] commandArgs, IVendingMachineService vendingMachineService)
        {
            decimal.TryParse(commandArgs[1], out var priceOut);

            int.TryParse(commandArgs[2], out var orderNumberOut);

            int.TryParse(commandArgs[3], out var quantityOut);

            if (vendingMachineService.Purchase(orderNumberOut, quantityOut, priceOut))
            {
                Console.WriteLine("Your order is successful enjoy!!");
                Console.WriteLine();
                Console.WriteLine("Thank You!!");
                Console.WriteLine();
            }
        }