예제 #1
0
        public void ValidateTest()
        {
            var model = new MinLengthValidatorModelTest
            {
                AbapDev = "Muf",
            };

            Assert.IsTrue(validator.Validate(model));
        }
예제 #2
0
        public void GetErrorMessageTest()
        {
            var model = new MinLengthValidatorModelTest
            {
                AbapDev = "Mufid Jamaluddin",
            };

            Assert.IsInstanceOfType(validator.Validate(model), typeof(bool));
            Assert.AreEqual(1, validator.GetErrorMessages().Count);
        }