Exemplo n.º 1
0
        public void Int32_ContainsRange_ShouldReturnTrue_ForRangeWithSameMinAndLowerMax()
        {
            DataRange <int> range = new DataRange <int>(0, 100);
            DataRange <int> other = new DataRange <int>(0, 50);

            var result = range.ContainsRange(other);

            result.Should().BeTrue();
        }
Exemplo n.º 2
0
        public void Int32_ContainsRange_ShouldReturnFalse_ForHigherOverlappingRange()
        {
            DataRange <int> range = new DataRange <int>(10, 20);
            DataRange <int> other = new DataRange <int>(15, 25);

            var result = range.ContainsRange(other);

            result.Should().BeFalse();
        }
Exemplo n.º 3
0
        public void Int32_ContainsRange_ShouldReturnFalse_ForRangeWithLowerMinSameMax()
        {
            DataRange <int> range = new DataRange <int>(10, 20);
            DataRange <int> other = new DataRange <int>(5, 20);

            var result = range.ContainsRange(other);

            result.Should().BeFalse();
        }
Exemplo n.º 4
0
        public void Int32_ContainsRange_ShouldReturnTrue_ForRangeFullyContained()
        {
            DataRange <int> range = new DataRange <int>(0, 100);
            DataRange <int> other = new DataRange <int>(25, 75);

            var result = range.ContainsRange(other);

            result.Should().BeTrue();
        }