Ejemplo n.º 1
0
        public void ListOfNumbersUpToThree()
        {
            //arrange
            int userint = 3;
            PingPongClass example = new PingPongClass(userint);
            List<string> userlist = example.getOutput();

            //act
            List<string> testlist = new List<string>{"1","2","ping"};

            //assert
            Assert.Equal(testlist, userlist);
        }
Ejemplo n.º 2
0
        public PingPong()
        {
            Get["/"] = _ =>
            {
              return View["index.cshtml"];
            };

            Post["/printout"] = _ =>
            {
              var input = Request.Form["inputNumber"];
              PingPongClass pingObject = new PingPongClass(input);
              // pingObject.PingPonger(input);
              List<string> newString = pingObject.getOutput();
              return View["printout.cshtml", newString];
            };
        }