示例#1
0
        public void testCombination_77_Q3D0N0P2()
        {
            Combo newCombo = new Combo(77);
            Dictionary<string, int> dummyDictionary = new Dictionary<string, int> {{"Quarters", 3}, {"Dimes", 0}, {"Nickels", 0}, {"Pennies", 2}};

            Assert.Equal(newCombo.Combination(), dummyDictionary);
        }
示例#2
0
        public void testCombination_41_Q1D1N1P1()
        {
            Combo newCombo = new Combo(41);
            Dictionary<string, int> dummyDictionary = new Dictionary<string, int> {{"Quarters", 1}, {"Dimes", 1}, {"Nickels", 1}, {"Pennies", 1}};

            Assert.Equal(newCombo.Combination(), dummyDictionary);
        }
示例#3
0
        public void testCombination_5_Q0D0N1P0()
        {
            Combo newCombo = new Combo(5);
            Dictionary<string, int> dummyDictionary = new Dictionary<string, int> {{"Quarters", 0}, {"Dimes", 0}, {"Nickels", 1}, {"Pennies", 0}};

            Assert.Equal(newCombo.Combination(), dummyDictionary);
        }
 public HomeModule()
 {
     Get["/"] = _ => {
     return View["index.cshtml"];
       };
       Post["/output"] = _ =>
       {
     Combo newCombo = new Combo(Request.Form["amount"]);
     Dictionary<string, int> result = newCombo.Combination();
     return View["output.cshtml", result];
       };
 }