Example #1
0
        public void IsNotLongerThan_ValueIsLongerThanMaxLength_ThrowsException()
        {
            StringValidator validator = new StringValidator("test", "12");

            ExceptionAssert.ThrowsLengthValidationException("test", 1, () =>
            {
                validator.IsNotLongerThan(1);
            });
        }
Example #2
0
        public void IsNotLongerThan_ValueIsMaxLength_NoException()
        {
            StringValidator validator = new StringValidator("test", "1");

            validator.IsNotLongerThan(1);
        }