public void ValidateTest() { var model = new ModelMaxLengthTest { AbapDev = "Mufid", }; Assert.IsTrue(validator.Validate(model)); }
public void GetErrorMessageTest() { var model = new ModelMaxLengthTest { AbapDev = "Mufid Jamaluddin", }; Assert.IsInstanceOfType(validator.Validate(model), typeof(bool)); Assert.AreEqual(1, validator.GetErrorMessages().Count); }