예제 #1
0
        public void IsSimilarShouldCheckTitleSubstringMatch(string title, bool similar)
        {
            var left = new DocumentReference {
                Title = "abc", Author = "b"
            };
            var right = new DocumentReference {
                Title = title, Author = "b"
            };

            Assert.AreEqual(similar, left.IsSimilar(right));
        }
예제 #2
0
        public void IsSimilarShouldApproximateMatchAuthors(
            string author,
            bool similar)
        {
            var left = new DocumentReference {
                Title = "abc", Author = "John Doe"
            };
            var right = new DocumentReference {
                Title = "abc", Author = author
            };

            Assert.AreEqual(similar, left.IsSimilar(right));
        }