예제 #1
0
        public void Test_IsBetween_OutsideLeft2()
        {
            double val  = -10;
            double from = -5.2;
            double to   = -1;

            var expected = false;
            var actual   = ValidationUtil.IsBetween(val, from, to);

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void Test_IsBetween_PositiveNegative()
        {
            double val  = 2;
            double from = -0.01;
            double to   = 2.01;

            var expected = true;
            var actual   = ValidationUtil.IsBetween(val, from, to);

            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void Test_IsBetween_BadArguments3()
        {
            double val  = 0;
            double from = 10;
            double to   = -1;

            var expected = false;
            var actual   = ValidationUtil.IsBetween(val, from, to);

            Assert.AreEqual(expected, actual);
        }
예제 #4
0
        public void Test_IsBetween_Negative()
        {
            double val  = -20;
            double from = -50;
            double to   = -10;

            var expected = true;
            var actual   = ValidationUtil.IsBetween(val, from, to);

            Assert.AreEqual(expected, actual);
        }
예제 #5
0
        public void Test_IsBetween_OutsideRight1()
        {
            double val  = 3;
            double from = 0.01;
            double to   = 2.01;

            var expected = false;
            var actual   = ValidationUtil.IsBetween(val, from, to);

            Assert.AreEqual(expected, actual);
        }