コード例 #1
0
    public static void Main()
    {
        Console.WriteLine("Please enter then amount of cents you would like change for.");
        int        MyTotalCents  = int.Parse(Console.ReadLine());
        CoinFinder CoinFinderObj = new CoinFinder(MyTotalCents);

        CoinFinderObj.CalcChange();
        PrintChange(MyTotalCents, CoinFinderObj);
    }
コード例 #2
0
        public void CalcChange_TestOneForAll()
        {
            CoinFinder coinTest = new CoinFinder(41);

            coinTest.CalcChange();
            Dictionary <string, int> testDict = new Dictionary <string, int> {
                { "Quarter", 1 }, { "Dime", 1 }, { "Nickel", 1 }, { "Penny", 1 }
            };

            CollectionAssert.AreEqual(testDict, coinTest.GetChangeAmt());
        }