Beispiel #1
0
        public void RangeOverlappingIsTrueSmaller()
        {
            var range1 = new DoubleRange(0, 10);
            var range2 = new DoubleRange(3, 7);

            Assert.IsTrue(range2.IsOverlapping(range1));
        }
Beispiel #2
0
        public void RangeOverlappingIsTrueReverse()
        {
            var range1 = new DoubleRange(5, 10);
            var range2 = new DoubleRange(7, 12);

            Assert.IsTrue(range2.IsOverlapping(range1));
        }
Beispiel #3
0
        public void RangeOverlappingIsFalseReverse()
        {
            var range1 = new DoubleRange(5, 10);
            var range2 = new DoubleRange(15, 20);

            Assert.IsFalse(range2.IsOverlapping(range1));
        }
Beispiel #4
0
        public void IsOverlappingTest(double min1, double max1, double min2, double max2, bool expectedResult)
        {
            DoubleRange range1 = new DoubleRange(min1, max1);
            DoubleRange range2 = new DoubleRange(min2, max2);

            Assert.AreEqual <bool>(expectedResult, range1.IsOverlapping(range2));
        }
Beispiel #5
0
        public void RangeOverlappingIsTrueItSelf()
        {
            var range1 = new DoubleRange(0, 10);

            Assert.IsTrue(range1.IsOverlapping(range1));
        }