public void IntervalIntersectionOrAdjacency(int s1, int e1, int s2, int e2, bool expected) { Interval<int> a = new Interval<int>(s1, e1); Interval<int> b = new Interval<int>(s2, e2); if (expected) { Assert.True(a.IntersectsOrIsAdjacentTo(b)); Assert.True(b.IntersectsOrIsAdjacentTo(a)); } else { Assert.False(a.IntersectsOrIsAdjacentTo(b)); Assert.False(b.IntersectsOrIsAdjacentTo(a)); } }