public void TestMethod_NumberOfOccurrences_long_2() { const string source1 = "long"; const string source2 = "a long long time ago in a galaxy far far away"; const int expected = 2; int result = StringFunc.NumberOfOccurrences(source1, source2); Assert.AreEqual(result, expected); }
public void TestMethod_NumberOfOccurrences_1() { const string source1 = "One"; const string source2 = "OneTwoThreeTwo"; const int expected = 1; int result = StringFunc.NumberOfOccurrences(source1, source2); Assert.AreEqual(result, expected); }
public void TestMethod_NumberOfOccurrences_3_with_upper_and_lower_case() { const string source1 = "One"; const string source2 = "oneTwoOneThreeTwoone"; const int expected = 3; int result = StringFunc.NumberOfOccurrences(source1, source2); Assert.AreEqual(result, expected); }
public void TestMethod_NumberOfOccurrences_numbers() { const string source1 = "6"; const string source2 = "123456789OneTwoThreeFourFive"; const int expected = 1; int result = StringFunc.NumberOfOccurrences(source1, source2); Assert.AreEqual(result, expected); }
public void TestMethod_NumberOfOccurrences_brown_fox_z_1() { const string source1 = "z"; const string source2 = "The quick brown fox jumps over the lazy dog"; const int expected = 1; int result = StringFunc.NumberOfOccurrences(source1, source2); Assert.AreEqual(result, expected); }