public void HowManyTimesItRepeated_WordandSentence_Result() { WordCounter testWordCounter = new WordCounter("a", "Pick a random string from a string array"); testWordCounter.ChangeToLowerCase(); testWordCounter.ChangeSentenceToWords(); Assert.AreEqual(2, testWordCounter.HowManyTimesItRepeated()); }
public void ChangeSentenceToWords_Sentence_ListOfWords() { WordCounter testWordCounter = new WordCounter("Hi", "How are you."); List <string> resultList = new List <string> { "how", "are", "you" }; testWordCounter.ChangeToLowerCase(); testWordCounter.ChangeSentenceToWords(); CollectionAssert.AreEqual(resultList, testWordCounter.GetWordsOfSentence()); }