Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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());
        }