예제 #1
0
 public void GetScore_SingleLetterScore_true()
 {
     Score newScoreTest = new Score ();
       //Make all variables & methods static to avoid creating a new object
       newScoreTest.SetLetterInput("l");
       Assert.Equal(1, newScoreTest.GetScore());
 }
예제 #2
0
 public HomeModule()
 {
     Get["/"] = _ => View["index.cshtml"];
       Post["/new_word"] = _ => {
     Score newScore = new Score ();
     newScore.SetLetterInput(Request.Form["new-word"]);
     return View["index.cshtml", newScore.GetScore()];
       };
 }
예제 #3
0
 public void GetScore_WholeWordScore_false()
 {
     Score newScoreTest = new Score ();
       newScoreTest.SetLetterInput("adbfkjq");
       Assert.Equal(1, newScoreTest.GetScore());
 }