예제 #1
0
        public void AddValidation_Integer()
        {
            adapter.AddValidation(context);

            Assert.Single(attributes);
            Assert.Equal(Validation.For("Integer", context.ModelMetadata.PropertyName), attributes["data-val-integer"]);
        }
예제 #2
0
        public void AddValidation_Integer()
        {
            adapter.AddValidation(context);

            Assert.Equal(2, attributes.Count);
            Assert.Equal("true", attributes["data-val"]);
            Assert.Equal(String.Format(Validations.Integer, context.ModelMetadata.PropertyName), attributes["data-val-integer"]);
        }