コード例 #1
0
        public void MinLengthProperty_LessAttributes()
        {
            var model = new ClassWithMinLengthProperty
            {
                MinLengthProperty = ""
            };

            var result = (new Validator()).IsValidate(model);

            Assert.IsFalse(result);
        }
コード例 #2
0
        public void MinLengthProperty_MoreAttributes()
        {
            var model = new ClassWithMinLengthProperty
            {
                MinLengthProperty = "Test"
            };

            var result = (new Validator()).IsValidate(model);

            Assert.IsTrue(result);
        }