Exemplo n.º 1
0
        public void Matches_should_detect_overlap_nominal()
        {
            var subj = new OverlapMatcher <string>(new [] { "a" });

            Assert.True(subj.Matches(new [] { "a", "b", "c" }));
            Assert.False(subj.Matches(new [] { "d" }));
        }
Exemplo n.º 2
0
        public void Matches_should_detect_overlap_string_comparison()
        {
            Comparison <char> comparison = (x, y) => x.CompareTo(y);
            var subj = new OverlapMatcher <string>(new [] { "A" }, StringComparer.OrdinalIgnoreCase);

            Assert.True(subj.Matches(new [] { "a", "b", "c" }));
            Assert.False(subj.Matches(new [] { "d" }));
        }