public void validatestringOfIncorrectLength() { _validatorService = new ValidatorService(); // strings with valid data and over the max length are invalid foreach (string test in STRING_VALID_LIST) { Assert.False(_validatorService.validateString(test, test.Length - 1, false)); } }
public void validatestringEmptyAndRequired() { _validatorService = new ValidatorService(); // strings with null or empty values and are required are invalid foreach (string test in STRING_EMPTY_LIST) { Assert.False(_validatorService.validateString(test, 1, true)); } }
public void validatestringOfCorrectLength() { _validatorService = new ValidatorService(); // strings with valid data and under max length are valid foreach (string test in STRING_VALID_LIST) { Assert.True(_validatorService.validateString(test, test.Length, false)); } }