Пример #1
0
 public Name(string value)
     : base(value,
            Validators.AllOf(
                StringValidators.MinLength(2),
                StringValidators.MaxLength(50),
                StringValidators.SingleLine),
            Canonicalizers.None <string>())
 {
 }
Пример #2
0
        public void ItShouldValidateMinimumLength(int minLength, string input, bool isValid)
        {
            var sut = StringValidators.MinLength(minLength);

            if (isValid)
            {
                sut(input).should_be_valid();
            }
            else
            {
                sut(input).should_fail();
            }
        }