示例#1
0
        public static void Test_InclusiveValue_LongValidator(long?value, bool valid)
        {
            // (-10.1, 10.1)
            var range = new Int64Validator(-10, 10, false, false, false, null);

            Assert.True(range.IsValid(value) == valid);
        }
示例#2
0
        public static void Test_InclusiveValue_Infinity_LongValidator(long?value, bool valid)
        {
            // [5, ∞)
            var range = new Int64Validator(-10, null, false, true, false, null); // maxExclusive is redundant

            Assert.True(range.IsValid(value) == valid);
        }
示例#3
0
        public static void Test_Infinity_ExclusiveValue_LongValidator(long?value, bool valid)
        {
            // (-∞, 10.1)
            var range = new Int64Validator(null, 10, true, true, false, null); // minExclusive is redundant

            Assert.True(range.IsValid(value) == valid);
        }
示例#4
0
        public static void Test_Empty_LongValidator(long?value, bool valid)
        {
            // (-∞, ∞)
            var range = new Int64Validator(null, null, false);

            Assert.True(range.IsValid(value) == valid);
        }