Ejemplo n.º 1
0
        public void GivenContactFuzzyMatcher_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <TestContact, TestContact>(Targets, this.SimpleDistance);

            BaseFuzzyMatcherTester.GivenContactFuzzyMatcher_ExpectPositiveMatch(matcher);
        }
Ejemplo n.º 2
0
        public void GivenZeroThresholdAndExactTarget_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenZeroThresholdAndExactTarget_ExpectPositiveMatch(matcher);
        }
Ejemplo n.º 3
0
        public void GivenZeroThresholdAndWrongTarget_ExpectNull()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenZeroThresholdAndWrongTarget_ExpectNull(matcher);
        }
Ejemplo n.º 4
0
        public void GivenHybridDistance_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, DistanceInput>(this.TargetStrings, this.HybridDistance, PhraseToDistanceInput);

            BaseFuzzyMatcherTester.GivenDistanceInput_ExpectPositiveMatch(matcher);
        }
Ejemplo n.º 5
0
        public void GivenMultipleNearestWithinThreshold_ExpectMultiplePositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenMultipleNearestWithinThreshold_ExpectMultiplePositiveMatch(matcher);
        }
Ejemplo n.º 6
0
        public void GivenStringDistanceAndExtractor_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <TestContact, string>(Targets, this.StringDistance, (target) => target.ToString());

            BaseFuzzyMatcherTester.GivenStringDistanceAndExtractor_ExpectPositiveMatch(matcher);
        }
Ejemplo n.º 7
0
        public void GivenPhoneticDistance_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, EnPronunciation>(this.TargetStrings, this.PhoneticDistance, phrase => PhraseToDistanceInput(phrase).Pronunciation);

            BaseFuzzyMatcherTester.GivenEnPronunciation_ExpectPositiveMatch(matcher);
        }
Ejemplo n.º 8
0
        public void GivenDifferentCase_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenDifferentCase_ExpectPositiveMatch(matcher);
        }
Ejemplo n.º 9
0
        public void GivenEmptyTarget_ExpectNull()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenEmptyTarget_ExpectNull(matcher);
        }
Ejemplo n.º 10
0
        public void GivenCustomDistanceDelegate_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, InverseStringDistance);

            BaseFuzzyMatcherTester.GivenCustomDistanceDelegate_ExpectPositiveMatch(matcher);
        }
Ejemplo n.º 11
0
        public void GivenNullTarget_ExpectException()
        {
            var matcher = new FuzzyMatcher <TestContact, string>(Targets, this.StringDistance, contact => contact.FullName);

            BaseFuzzyMatcherTester.GivenNullTarget_ExpectException(matcher);
        }
        public void GivenSimilarString_ExpectPositiveMatch()
        {
            var matcher = new AcceleratedFuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenSimilarString_ExpectPositiveMatch(matcher);
        }