Example #1
0
        public void GetSentence_GetSentence_String()
        {
            int         total          = 0;
            string      sentence       = "I am a sentence";
            WordCounter newWordCounter = new WordCounter(total, "", sentence);

            Assert.AreEqual(sentence, newWordCounter.GetSentence());
        }
Example #2
0
        public void ChangeToLowerCase_WordandSentence_SpecificAmount()
        {
            WordCounter testWordCounter = new WordCounter("Hi", "How are you.");

            testWordCounter.ChangeToLowerCase();
            Assert.AreEqual("hi", testWordCounter.GetWord());
            Assert.AreEqual("how are you.", testWordCounter.GetSentence());
        }
Example #3
0
        public void SetSentence_SetSentence_String()
        {
            int         total           = 0;
            string      sentence        = "I am a sentence";
            WordCounter newWordCounter  = new WordCounter(total, "", sentence);
            string      updatedSentence = "I love chai";

            newWordCounter.SetSentence(updatedSentence);
            Assert.AreEqual(updatedSentence, newWordCounter.GetSentence());
        }