Exemplo n.º 1
0
        public void SplitSentence_VerifySentencePunctuationIgnored_StringArray()
        {
            int    total    = 0;
            string word     = "test";
            string sentence = "I am a sentence.";

            string[]    expectedResult = { "I", "am", "a", "sentence" };
            WordCounter newWordCounter = new WordCounter(total, word, sentence);

            string[] actualResult = newWordCounter.SplitSentence();
            CollectionAssert.AreEqual(expectedResult, actualResult);
        }
Exemplo n.º 2
0
        public void SplitSentence_SplitSentenceWithoutPunctuation_StringArray()
        {
            int    total    = 0;
            string word     = "test";
            string sentence = "I am a sentence";

            string[] expectedResult = { "I", "am", "a", "sentence" };

            WordCounter newWordCounter = new WordCounter(total, word, sentence);

            CollectionAssert.AreEqual(expectedResult, newWordCounter.SplitSentence());
        }