public ActionResult Calculate() { string newWord = Request.Form["word"]; WordScore newScore = new WordScore(newWord); newScore.ScoreWord(); return(View("Index", newScore)); }
public void ScoreWord_TestCaps_Void() { //arrange int controlScore = 8; WordScore newWordScore = new WordScore("BAnAna"); //act newWordScore.ScoreWord(); //assert Assert.AreEqual(controlScore, newWordScore.GetScore()); }
public void GetWord_TestInput_String() { //Arrange string controlWord = "banana"; int controlScore = 8; WordScore newWordScore = new WordScore("banana"); newWordScore.ScoreWord(); //Act string wordResult = newWordScore.GetWord(); int scoreResult = newWordScore.GetScore(); //Assert Assert.AreEqual(wordResult, controlWord); Assert.AreEqual(scoreResult, controlScore); }