Example #1
0
        public void IsInRange_NotInRange_ReturnsFalse()
        {
            var r1 = new Range <double>(5, 10);
            var r2 = new Range <double>(6, 10);

            Assert.False(r2.IsInRange(r1));
        }
Example #2
0
        public void IsInRange_InRange_ReturnsTrue()
        {
            var r1 = new Range <double>(5, 10);
            var r2 = new Range <double>(6, 10);

            Assert.True(r1.IsInRange(r2));
        }
Example #3
0
        public void IsInRange_SameRange_ReturnsTrue()
        {
            var r1 = new Range <double>(5, 10);

            Assert.True(r1.IsInRange(r1));
        }
Example #4
0
        public void IsInRange_OutOfRange_False([Values(1, 2, 3, 4, 5)] double value)
        {
            var r = new Range <double>(6, 10);

            Assert.IsFalse(r.IsInRange(value));
        }
Example #5
0
        public void IsInRange_InRange_True([Values(1, 2, 3, 4, 5)] double value)
        {
            var r = new Range <double>(1, 100);

            Assert.IsTrue(r.IsInRange(value));
        }