Example #1
0
 public void LevenshteinDistanceTests(string s1, string s2)
 {
     var distanceTest = new DistanceTest(new LevenshteinDistance());
     distanceTest.NotNegativeTest(s1, s2);
     distanceTest.ZeroDistanceTest(s1, s2);
     distanceTest.SymmetryTest(s1, s2);
     distanceTest.TriangeInequalityTest(s1, s2, "abc");
 }
Example #2
0
        public void HammingDistanceTests(string s1, string s2)
        {
            var distanceTest = new DistanceTest(new HammingDistance());

            distanceTest.NotNegativeTest(s1, s2);
            distanceTest.ZeroDistanceTest(s1, s2);
            distanceTest.SymmetryTest(s1, s2);
            distanceTest.TriangeInequalityTest(s1, s2, "abc");
        }