Ejemplo n.º 1
0
        private static void RunExamples(VendingMachine vendingMachine)
        {
            var example1 = vendingMachine.GetChangeInCoins(itemValue: 35, userPaid: 50);

            PrettyPrint(example1, itemValue: 35, userPaid: 50);

            var example2 = vendingMachine.GetChangeInCoins(itemValue: 15, userPaid: 20);

            PrettyPrint(example2, itemValue: 15, userPaid: 20);

            var example3 = vendingMachine.GetChangeInCoins(itemValue: 18, userPaid: 25);

            PrettyPrint(example3, itemValue: 18, userPaid: 25);

            var example4 = vendingMachine.GetChangeInCoins(itemValue: 4, userPaid: 10);

            PrettyPrint(example4, itemValue: 4, userPaid: 10);

            var example5 = vendingMachine.GetChangeInCoins(itemValue: 31, userPaid: 5000);

            PrettyPrint(example5, 31, 5000);
        }