public void FormatErrorMessage_ForInteger() { attribute = new GreaterThanAttribute(10); String expected = String.Format(Validations.GreaterThan, "Sum", attribute.Minimum); String actual = attribute.FormatErrorMessage("Sum"); Assert.Equal(expected, actual); }
public void FormatErrorMessage_ForName() { attribute = new GreaterThanAttribute(12.56); String actual = attribute.FormatErrorMessage("Sum"); String expected = Validation.For("GreaterThan", "Sum", attribute.Minimum); Assert.Equal(expected, actual); }
public void FormatErrorMessage_FormatsErrorMessageForDouble() { attribute = new GreaterThanAttribute(12.56); String expected = String.Format(Validations.FieldMustBeGreaterThan, "Sum", attribute.Minimum); String actual = attribute.FormatErrorMessage("Sum"); Assert.Equal(expected, actual); }