Exemple #1
0
        public void TestMethod4()
        {
            string stringToCheck = null;

            var stringToFind = "s";

            var expectedResult = -1;

            var classUnderTest = new TestDesign.StringUtilities();

            var actualResult = classUnderTest.CountOccurences(stringToCheck, stringToFind[0]);

            Assert.AreEqual(expectedResult, actualResult);
        }
Exemple #2
0
        public void TestMethod1()
        {
            var stringToCheck = "mysterious";

            var stringToFind = "y";

            var expectedResult = 1;

            var classUnderTest = new TestDesign.StringUtilities();

            var actualResult = classUnderTest.CountOccurences(stringToCheck, stringToFind[0]);

            Assert.AreEqual(expectedResult, actualResult);
        }