public void LegacyComparison_NotMatchingStringswithSingleChar_ReturnsNothing() { //Arrange var expected = new List <int>(); ICompare comparer = new LegacyComparer(); //Act var actual = comparer.Compare("Polly put the kettle on, polly put the kettle on, polly put the kettle on we'll all have tea", "Polx"); //Assert Assert.IsTrue(expected.SequenceEqual(actual)); }
public void LegacyComparison_TwoCharCaseSensitiveStrings_ReturnsMatchingPositions() { //Arrange var expected = new List <int> { 3, 28, 53, 78, 82 }; ICompare comparer = new LegacyComparer(); //Act var actual = comparer.Compare("Polly put the kettle on, polly put the kettle on, polly put the kettle on we'll all have tea", "Ll"); //Assert Assert.IsTrue(expected.SequenceEqual(actual)); }
public void LegacyComparison_Strings_ReturnsMatchingPositions() { //Arrange var expected = new List <int> { 1, 26, 51 }; ICompare comparer = new LegacyComparer(); //Act var actual = comparer.Compare("Polly put the kettle on, polly put the kettle on, polly put the kettle on we'll all have tea", "polly"); //Assert Assert.IsTrue(expected.SequenceEqual(actual)); }