public void Validate_3Items_true()
        {
            var validator = new InputLengthValidator();
            var input     = new string[] { "1", "2", "3" };
            var actual    = validator.Validate(input);

            Assert.True(actual);
        }
Exemplo n.º 2
0
    protected InputLengthValidator MakeInputLengthValidator(TextBox forControl, int withMinLength, int withMaxLength, string withErrorMessage, InputValidator next)
    {
        InputLengthValidator validator = new InputLengthValidator(forControl, withMinLength, withMaxLength, withErrorMessage, next);

        HandleValidationErrorEvent(validator);

        return(validator);
    }
        public void Validate_2Items_false()
        {
            var validator = new InputLengthValidator();
            var input     = new string[] { "1", "2" };
            var actual    = validator.Validate(input);

            Assert.False(actual);
        }