public void ModelWithRangeAttribute_InvalidModel_ReturnsExpectedResults() { // Arrange var model = new ModelWithRangeAttribute { Discount = 150 }; // Act var result = ModelValidator.Validate(model); // Assert AssertIsNotValid(result, nameof(model.Discount), typeof(RangeAttribute), ValidationType.Range); }
public void ModelWithRangeAttribute_ValidModel_ReturnsExpectedResults() { // Arrange var model = new ModelWithRangeAttribute { Discount = 10 }; // Act var result = ModelValidator.Validate(model); // Assert AssertIsValid(result); }