public void ZeroLengthInputs() { List <int> result = FuzzyMatching.FindBestFuzzyMatch("", ""); List <int> expected = new List <int>(); Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result)); }
public void ZeroLengthSearchString() { List <int> result = FuzzyMatching.FindBestFuzzyMatch("whatsapp hellow", ""); List <int> expected = new List <int>(); Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result)); }
public void NoResult() { List <int> result = FuzzyMatching.FindBestFuzzyMatch("what is going on?", "whatsx goin on?"); List <int> expected = new List <int>(); Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result)); }
public void RealWorldProgramManager() { List <int> result = FuzzyMatching.FindBestFuzzyMatch("Program Manager", "pr"); List <int> expected = new List <int>() { 0, 1 }; Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result)); }
public void BestMatch() { List <int> result = FuzzyMatching.FindBestFuzzyMatch("aaacaab", "ab"); List <int> expected = new List <int>() { 5, 6 }; Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result)); }
public void SimpleMatching() { List <int> result = FuzzyMatching.FindBestFuzzyMatch("watsapp hellow", "hello"); List <int> expected = new List <int>() { 8, 9, 10, 11, 12 }; Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result)); }