コード例 #1
0
        public void Range_00_or_55_DoesNotIntersect_14_vice_versa()
        {
            var testRange   = new DekRange(1, 4);
            var otherRange2 = new DekRange(0, 0);
            var otherRange1 = new DekRange(5, 5);

            // Assert
            Assert.That(testRange.Intersects(otherRange1), Is.False);
            Assert.That(otherRange1.Intersects(testRange), Is.False);
            Assert.That(testRange.Intersects(otherRange2), Is.False);
            Assert.That(otherRange2.Intersects(testRange), Is.False);
        }
コード例 #2
0
        public void Range_14_Intersect_01_and_45_and_vice_versa()
        {
            var testRange   = new DekRange(1, 4);
            var otherRange1 = new DekRange(0, 1);
            var otherRange2 = new DekRange(4, 5);

            // Assert
            Assert.That(testRange.Intersects(otherRange1), Is.True);
            Assert.That(testRange.Intersects(otherRange2), Is.True);
            Assert.That(otherRange1.Intersects(testRange), Is.True);
            Assert.That(otherRange2.Intersects(testRange), Is.True);
        }
コード例 #3
0
        public void Range_19_Overlaps_46_vice_versa()
        {
            var testRange  = new DekRange(1, 9);
            var otherRange = new DekRange(4, 6);

            // Assert
            Assert.That(testRange.Intersects(otherRange), Is.True);
            Assert.That(otherRange.Intersects(testRange), Is.True);
        }
コード例 #4
0
        public void Range_14_DoesNotOverlap_59_vice_versa()
        {
            var testRange  = new DekRange(1, 4);
            var otherRange = new DekRange(5, 9);

            // Assert
            Assert.That(testRange.Intersects(otherRange), Is.False);
            Assert.That(otherRange.Intersects(testRange), Is.False);
        }