コード例 #1
0
        public void MinValueAttribute_ForDouble()
        {
            Decimal actual = new MinValueAttribute(12.56).Minimum;
            Decimal expected = 12.56M;

            Assert.Equal(expected, actual);
        }
コード例 #2
0
        public void FormatErrorMessage_ForInteger()
        {
            attribute = new MinValueAttribute(10);

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

            Assert.Equal(expected, actual);
        }
コード例 #3
0
        public void MinValueAttribute_ForInteger()
        {
            Decimal actual = new MinValueAttribute(10).Minimum;
            Decimal expected = 10M;

            Assert.Equal(expected, actual);
        }
コード例 #4
0
 public MinValueAttributeTests()
 {
     attribute = new MinValueAttribute(12.56);
 }