コード例 #1
0
        public void GetWord_GetWord_String()
        {
            int         total          = 0;
            string      word           = "test";
            WordCounter newWordCounter = new WordCounter(total, word, "");

            Assert.AreEqual(word, newWordCounter.GetWord());
        }
コード例 #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());
        }
コード例 #3
0
        public void SetWord_SetWord_string()
        {
            int         total          = 0;
            string      word           = "test";
            WordCounter newWordCounter = new WordCounter(total, word, "");
            string      updatedWord    = "wow";

            newWordCounter.SetWord(updatedWord);
            Assert.AreEqual(updatedWord, newWordCounter.GetWord());
        }