Пример #1
0
        public void IsValid_With_Correct_String()
        {
            object stringObj = "test";
            var    strattr   = new CustomMinStringLengthAttribute(3);

            Assert.IsTrue(strattr.IsValid(stringObj));
        }
Пример #2
0
        public void IsValid_With_Incorrect_String()
        {
            object stringObj = "no";
            var    strattr   = new CustomMinStringLengthAttribute(3);

            Assert.IsFalse(strattr.IsValid(stringObj));
        }
Пример #3
0
        public void IsValid_With_Null_String()
        {
            object nullObj = null;
            var    strattr = new CustomMinStringLengthAttribute(3);

            Assert.IsTrue(strattr.IsValid(nullObj));
        }