Exemplo n.º 1
0
        public void WordCount_NoMatch_Count3()
        {
            WordCounter newWordCount = new WordCounter("wow", "wow ! @ # $ % #$# wow wow pow fsdfsdf xcvnxm ewrew sf sd 8297349");
            int         count        = newWordCount.GetCount();

            Assert.AreEqual(3, count);
        }
Exemplo n.º 2
0
        public void WordCount_RemovePunctuation_Count1()
        {
            WordCounter newWordCount = new WordCounter("wow", "wow!");
            int         count        = newWordCount.GetCount();

            Assert.AreEqual(1, count);
        }
Exemplo n.º 3
0
        public void WordCount_NoMatch_Count0()
        {
            WordCounter newWordCount = new WordCounter("wow", "pow");
            int         count        = newWordCount.GetCount();

            Assert.AreEqual(0, count);
        }
Exemplo n.º 4
0
        public void WordCount_InputToLower_Count1()
        {
            WordCounter newWordCount = new WordCounter("ChArlIE", "charlie");
            int         count        = newWordCount.GetCount();

            Assert.AreEqual(1, count);
        }
Exemplo n.º 5
0
        public void WordCount_SentenceToLower_Count1()
        {
            WordCounter newWordCount = new WordCounter("charlie", "Charlie");
            int         count        = newWordCount.GetCount();

            Assert.AreEqual(1, count);
        }
Exemplo n.º 6
0
        public void WordCount_GetCount_Count1()
        {
            WordCounter newWordCount = new WordCounter("charlie", "charlie charlie ! wow heya wow thats so cool bro");
            int         count        = newWordCount.GetCount();

            Assert.AreEqual(2, count);
        }
Exemplo n.º 7
0
        public void GetCount_WordCount_Count1()
        {
            WordCounter newWordCount = new WordCounter("cat", "cat");
            int         count        = newWordCount.GetCount();

            Assert.AreEqual(1, count);
        }