Ejemplo n.º 1
0
        public ActionResult PingPongResults()
        {
            PingPong      newPingPong  = new PingPong();
            int           userInput    = Int32.Parse(Request.Form["input-number"]);
            List <string> pingPongList = newPingPong.NumberCalc(userInput);

            return(View("PingPongResults", pingPongList));
        }
Ejemplo n.º 2
0
        public void TestNumberCalc()
        {
            PingPong      newPingPong           = new PingPong();
            List <string> setValuesPingPongList = new List <string> {
                "1", "2", "Pong", "4", "Ping"
            };

            CollectionAssert.AreEqual(setValuesPingPongList, newPingPong.NumberCalc(5));
        }
Ejemplo n.º 3
0
        public void TestNumberCalc()
        {
            PingPong      testPingPong         = new PingPong();
            List <string> pingPongTestCaseList = new List <string>
            {
                "1", "2", "Pong", "4", "Ping", "Pong", "7", "8", "Pong", "10", "11", "Pong", "13", "14", "Ping-Pong"
            };

            CollectionAssert.AreEqual(pingPongTestCaseList, testPingPong.NumberCalc(15));
        }