public void ThresholdOfToStrings(double threshold, string s1, string s2) { var length = Math.Max(s1.Length, s2.Length); Assert.Equal(threshold, StringDistance.NormalizeDistance(StringDistance.DamareuLevenshteinDistance(s1, s2), length)); }
public void ThresholdOfToStringsThatAreEmpty() { Assert.Equal(0, StringDistance.NormalizeDistance(StringDistance.DamareuLevenshteinDistance(string.Empty, string.Empty), 0)); }
public void TresholdOfToStringsThatAreEmpty(double treshold, string s1, string s2) { var length = s1.Length > s2.Length ? s1.Length : s2.Length; Assert.Equal(treshold, StringDistance.NormalizeDistance(StringDistance.DamareuLevenshteinDistance(s1, s2), length)); }