Example #1
0
        public void TestSetMinHigherThanMax()
        {
            // unittest-intervaldatastructuresethighmin
            IntervalStruct interval = new IntervalStruct("x", 3, 4, true, true);

            interval.SetMinBound(5);
            Assert.AreEqual(4, interval.GetMinBound());
            Assert.AreEqual(5, interval.GetMaxBound());
        }
Example #2
0
        public void TestSetMethodsSimple()
        {
            // unittest-intervaldatastructuresetters
            IntervalStruct interval = new IntervalStruct("x", 3, 4, false, true);

            interval.SetMinBound(2);
            interval.SetMaxBound(5);
            interval.SetLeftBoundClosed(true);
            interval.SetRightBoundClosed(false);

            Assert.AreEqual(2, interval.GetMinBound());
            Assert.AreEqual(5, interval.GetMaxBound());
            Assert.AreEqual(true, interval.IsLeftBoundClosed());
            Assert.AreEqual(false, interval.IsRightBoundClosed());
        }