Пример #1
0
        public void CustomMessageIsSentToIBrowserValidationGenerator()
        {
            var browserValidationGenerator = new FakeIBrowserValidationGenerator();

            browserValidationGenerator.SetValueRange("TargetField", 0, 1, CustomErrorMessage);
            Assert.IsFalse(validatorIntMessage.IsValid(intTarget, -2));
            validatorIntMessage.ApplyBrowserValidation(null, InputElementType.Text, browserValidationGenerator, new Hashtable(), "TargetField");
            Assert.AreEqual(CustomErrorMessage, validatorIntMessage.ErrorMessage);
        }
		public void CustomMessageIsSentToIBrowserValidationGenerator()
		{
			var browserValidationGenerator = new FakeIBrowserValidationGenerator();
			browserValidationGenerator.SetValueRange("TargetField", 0, 1, CustomErrorMessage);
			Assert.IsFalse(validatorIntMessage.IsValid(intTarget, -2));
			validatorIntMessage.ApplyBrowserValidation(null, InputElementType.Text, browserValidationGenerator, new Hashtable(), "TargetField");
			Assert.AreEqual(CustomErrorMessage, validatorIntMessage.ErrorMessage);

		}