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" })); }
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" })); }