예제 #1
0
        public void IntervalFromEndpoints()
        {
            Interval ab = Interval.FromEndpoints(a, b);
            Interval ba = Interval.FromEndpoints(b, a);

            Assert.IsTrue(ab.LeftEndpoint == ba.LeftEndpoint);
            Assert.IsTrue(ab.RightEndpoint == ba.RightEndpoint);
            Assert.IsTrue(ab.Width == ba.Width);
            Assert.IsTrue(ab == ba);
            Assert.IsFalse(ab != ba);
            Assert.IsTrue(ab.GetHashCode() == ba.GetHashCode());
        }