Exemplo n.º 1
0
        public void Should_Intersect()
        {
            var d = new IntRange(10, 50);

            d.Intersects(new IntRange(10, 50)).Should().BeTrue();
            d.Intersects(new IntRange(20, 40)).Should().BeTrue();
            d.Intersects(new IntRange(40, 100)).Should().BeTrue();
            d.Intersects(new IntRange(0, 10)).Should().BeFalse(); // adjacent does not intersect
            d.Intersects(new IntRange(60, 100)).Should().BeFalse();
            d.Intersects(new IntRange(0, 20)).Should().BeTrue();
        }