コード例 #1
0
        public void CheckDatMoney_ReturnMinimumNumberOfCoins_Dictionary()
        {
            //Arrange
            CashMoney testCash = new CashMoney(92);
            Dictionary <string, int> expected = new Dictionary <string, int> ()
            {
                { "Quarters", 3 },
                { "Dimes", 1 },
                { "Nickels", 1 },
                { "Pennies", 2 }
            };
            //Act
            Dictionary <string, int> actual = testCash.CheckDatMoney();

            //Assert
            CollectionAssert.AreEqual(expected, actual);
        }
コード例 #2
0
        public ActionResult MakeItRain()
        {
            CashMoney newCash = new CashMoney(int.Parse(Request.Form["cash"]));

            return(View(newCash.CheckDatMoney()));
        }