コード例 #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);
        }
コード例 #12
0
        public void GivenSimilarString_ExpectPositiveMatch()
        {
            var matcher = new AcceleratedFuzzyMatcher <string, string>(this.TargetStrings, this.StringDistance);

            BaseFuzzyMatcherTester.GivenSimilarString_ExpectPositiveMatch(matcher);
        }