FormatErrorMessage() public method

public FormatErrorMessage ( String name ) : String
name String
return String
        public void FormatErrorMessage_ForDouble()
        {
            attribute = new MaxValueAttribute(13.44);

            String expected = String.Format(Validations.MaxValue, "Sum", attribute.Maximum);
            String actual = attribute.FormatErrorMessage("Sum");

            Assert.Equal(expected, actual);
        }
        public void FormatErrorMessage_ForInteger()
        {
            attribute = new MaxValueAttribute(10);

            String expected = String.Format(Validations.FieldMustBeLessOrEqualTo, "Sum", attribute.Maximum);
            String actual = attribute.FormatErrorMessage("Sum");

            Assert.Equal(expected, actual);
        }