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); }
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); }