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()); }
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()]; }; }
public void GetScore_WholeWordScore_false() { Score newScoreTest = new Score (); newScoreTest.SetLetterInput("adbfkjq"); Assert.Equal(1, newScoreTest.GetScore()); }