Пример #1
0
        public static void Validation_ErrorMessage()
        {
            //Countries.Initialize();
            var attribute = new ValidateCountryIsoAttribute();

            Assert.False(attribute.IsValid("INVALID"));
            var t = attribute.FormatErrorMessage("ISO");

            Assert.NotEmpty(t);
        }
Пример #2
0
        public static void IsValid(string iso, bool result)
        {
            //Countries.Initialize();
            var attribute = new ValidateCountryIsoAttribute
            {
                AllowEmptyStrings = true
            };

            Assert.Equal(result, attribute.IsValid(iso));
        }