public ActionResult Results() { RepeatCounter newRepeatCounter = new RepeatCounter(Request.Form["input-string"], Request.Form["input-keyword"]); newRepeatCounter.CreateSearchedStringList(); newRepeatCounter.CalculateWordTotal(); return(View(newRepeatCounter)); }
public void CalculateWordTotal_ReturnNumberOfFoundWords_Int() { //Arrange RepeatCounter newRepeatCounter = new RepeatCounter("hello, hello, hello, hello", "hello"); //Act newRepeatCounter.CreateSearchedStringList(); int calcTotal = newRepeatCounter.CalculateWordTotal(); int newTotal = 4; //Assert Assert.AreEqual(4, calcTotal); }