Esempio n. 1
0
        public void CheckInputtedPhrase_GetPhraseString()
        {
            RepeatCounter repeat = new RepeatCounter();
            string        phrase = repeat.GetInputtedPhrase();

            Assert.AreEqual("", repeat.GetInputtedPhrase());
        }
Esempio n. 2
0
        public void CountOccurence_PhraseWords_NumberOfTimesPerWord()
        {
            RepeatCounter repeat = new RepeatCounter();
            string        phrase = repeat.GetInputtedPhrase();

            string[] phraseString = phrase.Split(' ');
            Dictionary <string, int> phraseDictionary = repeat.GetUniquePhraseWordCount(phraseString);
            string word1      = repeat.GetPhraseKeys(phraseDictionary)[0];
            int    word1Count = repeat.GetPhraseWordCounts(phraseDictionary)[0];

            Assert.AreEqual("", word1);
            Assert.AreEqual(1, word1Count);
        }