Exemple #1
0
        public void ShouldEvaluateAsMajorIntervalContainedInOtherInterval()
        {
            var intervalOne = new IntervalWithValue <long, long>(1, 5, 0);
            var intervalTwo = new IntervalWithValue <long, long>(-5, 10, 0);

            Assert.Equal(1, intervalOne.CompareTo(intervalTwo));
        }
Exemple #2
0
        public void ShouldEvaluateAsMinorIntervalWithInitEqualAndEndMajor()
        {
            var intervalOne = new IntervalWithValue <long, long>(1, 5, 0);
            var intervalTwo = new IntervalWithValue <long, long>(1, 6, 0);

            Assert.Equal(-1, intervalOne.CompareTo(intervalTwo));
        }
Exemple #3
0
        public void ShouldEvaluateAsEqualIntervals()
        {
            var intervalOne = new IntervalWithValue <long, long>(1, 5, 0);
            var intervalTwo = new IntervalWithValue <long, long>(1, 5, 0);

            Assert.Equal(0, intervalOne.CompareTo(intervalTwo));
        }
Exemple #4
0
        public void ShouldEvaluateAsMajorIntervalsWithInitAndEndMinorExclusive()
        {
            var intervalOne = new IntervalWithValue <long, long>(1, 5, 0);
            var intervalTwo = new IntervalWithValue <long, long>(-5, 0, 0);

            Assert.Equal(1, intervalOne.CompareTo(intervalTwo));
        }