Beispiel #1
0
        public ActionResult Results()
        {
            RepeatCounter newRepeatCounter = new RepeatCounter(Request.Form["input-string"], Request.Form["input-keyword"]);

            newRepeatCounter.CreateSearchedStringList();
            newRepeatCounter.CalculateWordTotal();
            return(View(newRepeatCounter));
        }
Beispiel #2
0
        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);
        }