Exemple #1
0
        public void GenericRangeIsWithinReturnsFalseIfDateIsAfterEnd()
        {
            int testValue = 16;

            var range = new GenericRange <int>(_start, _end);

            Assert.IsFalse(range.IsWithin(testValue));
        }
Exemple #2
0
        public void GenericRangeIsWithinReturnsTrueIfDateIncluded()
        {
            int testValue = 14;

            var range = new GenericRange <int>(_start, _end);

            Assert.IsTrue(range.IsWithin(testValue));
        }
Exemple #3
0
        public void GenericRangeIsWithinReturnsFalseIfEndDateIsAfter()
        {
            var range = new GenericRange <int>(_start, _end);

            Assert.IsFalse(range.IsWithin(new GenericRange <int>(_start, _end + 1)));
        }
Exemple #4
0
        public void GenericRangeIsWithinReturnsFalseIfStartDateIsBefore()
        {
            var range = new GenericRange <int>(_start, _end);

            Assert.IsFalse(range.IsWithin(new GenericRange <int>(_start - 1, _end)));
        }
Exemple #5
0
        public void GenericRangeIsWithinReturnsFalseIfRangeIsNull()
        {
            var range = new GenericRange <int>(_start, _end);

            Assert.IsFalse(range.IsWithin(null as IRange <int>));
        }
Exemple #6
0
        public void GenericRangeIsWithinReturnsTrueIfStartDateAndEndDateIsIncluded()
        {
            var range = new GenericRange <int>(_start, _end);

            Assert.IsTrue(range.IsWithin(new GenericRange <int>(_start + 1, _end - 1)));
        }