Esempio n. 1
0
 public HomeModule()
 {
     Get["/"] = _ => {
         return(View["index.cshtml"]);
     };
     Post["/"] = _ => {
         PPG.ClearAll();
         PPG           ppg      = new PPG(int.Parse(Request.Form["userNumber"]));
         List <string> userList = ppg.GetAll();
         return(View["index.cshtml", userList]);
     };
 }
Esempio n. 2
0
 public HomeModule()
 {
     Get["/"] = _ => {
       return View["index.cshtml"];
       };
       Post["/"] = _ => {
     PPG.ClearAll();
     PPG ppg = new PPG(int.Parse(Request.Form["userNumber"]));
     List<string> userList = ppg.GetAll();
     return View["index.cshtml",userList];
       };
 }
Esempio n. 3
0
        public void Test1ReturnAListOfPingsAndPongs()
        {
            //Arrange
              int userInt = 7;
              PPG ppg = new PPG(userInt);
              List<string> userList = ppg.GetAll();

              //Act
              List<string> testList = new List<string>{"1", "2", "ping", "4", "pong", "ping", "7"};

              //Assert
              Assert.Equal(testList, userList);
        }
Esempio n. 4
0
        public void Test1ReturnAListOfPingsAndPongs()
        {
            //Arrange
            int           userInt  = 7;
            PPG           ppg      = new PPG(userInt);
            List <string> userList = ppg.GetAll();

            //Act
            List <string> testList = new List <string> {
                "1", "2", "ping", "4", "pong", "ping", "7"
            };

            //Assert
            Assert.Equal(testList, userList);
        }
Esempio n. 5
0
 public void Dispose()
 {
     PPG.ClearAll();
 }