Ejemplo n.º 1
0
        public void Range_should_not_contain_other_range_when_opposite_sides_are_infinity()
        {
            var range = new NullableRange<int>(null, 1);

            var target = new NullableRange<int>(0, null);
            var actual = target.Contains(range);

            Assert.That(actual, Is.False);
        }
Ejemplo n.º 2
0
        public void Range_should_not_contain_infinity()
        {
            var infinity = new NullableRange<int>(null, null);

            var target = new NullableRange<int>(0, null);
            var actual = target.Contains(infinity);

            Assert.That(actual, Is.False);
        }
Ejemplo n.º 3
0
        public void Range_should_contain_other_range_when_targets_one_side_is_infinity_and_other_range_is_fixed()
        {
            var range = new NullableRange<int>(1, 2);

            var target = new NullableRange<int>(0, null);
            var actual = target.Contains(range);

            Assert.That(actual, Is.True);
        }
Ejemplo n.º 4
0
        public void Range_should_contain_other_range_when_same_sides_are_infinite_and_other_side_is_set()
        {
            var range = new NullableRange<int>(1, null);

            var target = new NullableRange<int>(0, null);
            var actual = target.Contains(range);

            Assert.That(actual, Is.True);
        }
Ejemplo n.º 5
0
        public void Range_should_contain_null_range()
        {
            var target = new NullableRange<int>(0, null);
            var actual = target.Contains((BaseRange<int?>) null);

            Assert.That(actual, Is.True);
        }
Ejemplo n.º 6
0
        public void Infinity_should_contain_any_range()
        {
            var infinity = new NullableRange<int>(null, null);

            var range = new NullableRange<int>(0, null);
            var actual = infinity.Contains(range);

            Assert.That(actual, Is.True);
        }