Example #1
0
        private static void CheckIntersect <TValue>(Range <TValue> range1, Range <TValue> range2)
            where TValue : IComparable <TValue>
        {
            var intesection = range1.Intersect(range2);

            Assert.AreEqual(true, intesection.IsEmpty, "Intesection should be empty");

            intesection = range2.Intersect(range1);
            Assert.AreEqual(true, intesection.IsEmpty, "Intesection should be empty");
        }
Example #2
0
        private static void CheckIntersect <TValue>(Range <TValue> range1, Range <TValue> range2, Range <TValue> expected)
            where TValue : IComparable <TValue>
        {
            var intesection = range1.Intersect(range2);

            Assert.AreEqual(expected, intesection);

            intesection = range2.Intersect(range1);
            Assert.AreEqual(expected, intesection);
        }