Exemple #1
0
        public void FormatErrorMessage_ForName()
        {
            attribute = new MinValueAttribute(12.56);

            String actual   = attribute.FormatErrorMessage("Sum");
            String expected = Validation.For("MinValue", "Sum", attribute.Minimum);

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

            String expected = String.Format(Validations.MinValue, "Sum", attribute.Minimum);
            String actual   = attribute.FormatErrorMessage("Sum");

            Assert.Equal(expected, actual);
        }