Example #1
0
        public void Vowels_ReturnsNumberOfVowels()
        {
            VowelCounter vc    = new VowelCounter();
            string       str   = "Hello friend";
            var          count = vc.GetVowelCount(str);

            Assert.Equal(4, count);
        }
Example #2
0
        public void CountingEspecialVowels()
        {
            string input = "HÉllo this Is WÓrld Test";

            Dictionary <string, int> expected = new Dictionary <string, int>()
            {
                { "e", 2 }, { "o", 2 }, { "i", 2 }
            };

            VowelCounter vowelCounter = new VowelCounter();

            var actualOutput = vowelCounter.Counter(input);

            CollectionAssert.AreEqual(expected, actualOutput);
        }
Example #3
0
        public void CountingVowelsWithCase()
        {
            string input = "HEllo WOrld";

            Dictionary <string, int> expected = new Dictionary <string, int>()
            {
                { "e", 1 }, { "o", 2 }
            };

            VowelCounter vowelCounter = new VowelCounter();

            var actualOutput = vowelCounter.Counter(input);

            CollectionAssert.AreEqual(expected, actualOutput);
        }
Example #4
0
 public VowelCounterTests()
 {
     _vowelCounter = new VowelCounter();
 }
Example #5
0
    public void MyTest()
    {
        string hello = "hello";

        Assert.AreEqual(VowelCounter.countVowels(hello), 2);
    }