Exemplo n.º 1
0
        public void MultipleWordMatch_Two()
        {
            string Word = "apple";

            string[]    InputStringArray = new string[] { "apple", "bags", "of", "apple" };
            WordCounter testWordCounter  = new WordCounter();

            Assert.AreEqual(2, testWordCounter.CountWordsTest(Word, InputStringArray));
        }
Exemplo n.º 2
0
        public void WrongInputNumber_Zero()
        {
            string Word = "3";

            string[]    InputStringArray = new string[] { "apple" };
            WordCounter testWordCounter  = new WordCounter();

            Assert.AreEqual(0, testWordCounter.CountWordsTest(Word, InputStringArray));
        }
Exemplo n.º 3
0
        public void NoMatch_Zero()
        {
            string Word = "ball";

            string[]    InputStringArray = new string[] { "Practice", "makes", "perfect" };
            WordCounter testWordCounter  = new WordCounter();

            Assert.AreEqual(0, testWordCounter.CountWordsTest(Word, InputStringArray));
        }
Exemplo n.º 4
0
        public void PartialMatch_Zero()
        {
            string Word = "b";

            string[]    InputStringArray = new string[] { "back" };
            WordCounter testWordCounter  = new WordCounter();

            Assert.AreEqual(0, testWordCounter.CountWordsTest(Word, InputStringArray));
        }
Exemplo n.º 5
0
        public void NoInput_Zero()
        {
            string Word = "";

            string[]    InputStringArray = new string[] { "" };
            WordCounter testWordCounter  = new WordCounter();

            Assert.AreEqual(0, testWordCounter.CountWordsTest(Word, InputStringArray));
        }
Exemplo n.º 6
0
        public void MatchOneWord_One()
        {
            string Word = "Sally";

            string[]    InputStringArray = new string[] { "Sally" };
            WordCounter testWordCounter  = new WordCounter();

            Assert.AreEqual(1, testWordCounter.CountWordsTest(Word, InputStringArray));
        }