public ActionResult Count() { words newWords = new words(); newWords.SetParagraph(Request.Form["inputPara"]); newWords.SetWord(Request.Form["inputWord"]); newWords.Compare(); return(View("index", newWords.GetScore())); }
public void UserParagraph_Compare_True() { //Arrange string newWord = "pizza"; string newParagraph = "oh boy, i sure love pizza"; words newWords = new words(); //Act newWords.SetWord(newWord); newWords.SetParagraph(newParagraph); string testWord = newWords.GetWord(); string[] testPara = newWords.Split(); int result = newWords.Compare(testWord, testPara); //Assert Assert.AreEqual(result, 1); }