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)); }
public void TestNumberCalc() { PingPong newPingPong = new PingPong(); List <string> setValuesPingPongList = new List <string> { "1", "2", "Pong", "4", "Ping" }; CollectionAssert.AreEqual(setValuesPingPongList, newPingPong.NumberCalc(5)); }
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)); }