public void FormatErrorMessage_ForDouble() { attribute = new MinValueAttribute(12.56); String expected = String.Format(Validations.MinValue, "Sum", attribute.Minimum); String actual = attribute.FormatErrorMessage("Sum"); Assert.Equal(expected, actual); }
public void FormatErrorMessage_FormatsErrorMessageForInteger() { attribute = new MinValueAttribute(10); String expected = String.Format(Validations.FieldMustBeGreaterOrEqualTo, "Sum", attribute.Minimum); String actual = attribute.FormatErrorMessage("Sum"); Assert.Equal(expected, actual); }