Пример #1
0
        public void OnSorting_WithSameMatchConfidence_TargetIsOrderedByCase()
        {
            const string alexCorrect   = "AlexCorrect";
            const string amandaCorrect = "AmandaCorrect";
            var          mocker        = new List <IMatch>
            {
                new Match("Alex", "Amanda", .20d),
                new Match(alexCorrect, amandaCorrect, 1d),
                new Match(alexCorrect, "AmandaWrong", 1d),
                new Match("Alex", "AmandaTried", .20d)
            };

            IEnumerable <IMatch> results = null;

            results = new DefaultMatchSorter().SortMatches(mocker);
            Assert.That(results.FirstOrDefault().SourceString, Is.EqualTo(alexCorrect));
            Assert.That(results.FirstOrDefault().TargetString, Is.EqualTo(amandaCorrect));
        }
Пример #2
0
 public MatchSorterTests()
 {
     _sorter = new DefaultMatchSorter();
 }