Example #1
0
        public void RequiredProperty_IsEmpty()
        {
            var model = new ClassWithRequiredProperty
            {
                RequiredProperty = null
            };

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

            Assert.IsFalse(result);
        }
Example #2
0
        public void RequiredProperty_IsNotEmpty()
        {
            var model = new ClassWithRequiredProperty
            {
                RequiredProperty = "test"
            };

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

            Assert.IsTrue(result);
        }