public void ModelWithStringLengthAttribute_InvalidModel_ReturnsExpectedResults() { // Arrange var model = new ModelWithStringLengthAttribute { Name = "123456789" }; // Act var result = ModelValidator.Validate(model); // Assert AssertIsNotValid(result, nameof(model.Name), typeof(StringLengthAttribute), ValidationType.StringLength); }
public void ModelWithStringLengthAttribute_ValidModel_ReturnsExpectedResults() { // Arrange var model = new ModelWithStringLengthAttribute { Name = "1234567890" }; // Act var result = ModelValidator.Validate(model); // Assert AssertIsValid(result); }