public void LedNoMatch() { // Arrange var str1 = "Achany Estate"; var str2 = "Aikengall"; var algorithm = new LevenshteinEditDistance(); // Act var result = algorithm.Match(str1, str2); // Assert Assert.AreEqual(10, result, "Expected a similarity match, should be an edit distance of 10"); }
public void LedSimilarityMatch() { // Arrange var str1 = "Hadyard Hill"; var str2 = "Hadyard Hill, Barr"; var algorithm = new LevenshteinEditDistance(); // Act var result = algorithm.Match(str1, str2); // Assert Assert.AreEqual(6, result, "Expected a similarity match, should be an edit distance of 6"); }
public void LedExactMatch() { // Arrange var str1 = "Cathkin Braes"; var str2 = "Cathkin Braes"; var algorithm = new LevenshteinEditDistance(); // Act var result = algorithm.Match(str1, str2); // Assert Assert.AreEqual(0, result, "Expected an exact match, should return 0"); }