Пример #1
0
        public void GivenContactFuzzyMatcher_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <TestContact, TestContact>(Targets, this.SimpleDistance);

            BaseFuzzyMatcherTester.GivenContactFuzzyMatcher_ExpectPositiveMatch(matcher);
        }
Пример #2
0
        public void GivenZeroThresholdAndExactTarget_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenZeroThresholdAndExactTarget_ExpectPositiveMatch(matcher);
        }
Пример #3
0
        public void GivenZeroThresholdAndWrongTarget_ExpectNull()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenZeroThresholdAndWrongTarget_ExpectNull(matcher);
        }
Пример #4
0
        public void GivenHybridDistance_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, DistanceInput>(this.TargetStrings, this.HybridDistance, PhraseToDistanceInput);

            BaseFuzzyMatcherTester.GivenDistanceInput_ExpectPositiveMatch(matcher);
        }
Пример #5
0
        public void GivenMultipleNearestWithinThreshold_ExpectMultiplePositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenMultipleNearestWithinThreshold_ExpectMultiplePositiveMatch(matcher);
        }
Пример #6
0
        public void GivenStringDistanceAndExtractor_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <TestContact, string>(Targets, this.StringDistance, (target) => target.ToString());

            BaseFuzzyMatcherTester.GivenStringDistanceAndExtractor_ExpectPositiveMatch(matcher);
        }
Пример #7
0
        public void GivenPhoneticDistance_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, EnPronunciation>(this.TargetStrings, this.PhoneticDistance, phrase => PhraseToDistanceInput(phrase).Pronunciation);

            BaseFuzzyMatcherTester.GivenEnPronunciation_ExpectPositiveMatch(matcher);
        }
Пример #8
0
        public void GivenDifferentCase_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenDifferentCase_ExpectPositiveMatch(matcher);
        }
Пример #9
0
        public void GivenEmptyTarget_ExpectNull()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenEmptyTarget_ExpectNull(matcher);
        }
Пример #10
0
        public void GivenCustomDistanceDelegate_ExpectPositiveMatch()
        {
            var matcher = new FuzzyMatcher <string, string>(this.TargetStrings, InverseStringDistance);

            BaseFuzzyMatcherTester.GivenCustomDistanceDelegate_ExpectPositiveMatch(matcher);
        }
Пример #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);
        }