示例#1
0
        public void Render()
        {
            RangeValidatorTestClass p;
            TextBox t;

            p = new RangeValidatorTestClass();
            StartValidationTest(p);
            p.Type = ValidationDataType.Integer;

            Assert.AreEqual(false, p.UpRender(), "R0");

            t = SetValidationTextBox("textbox", "3");

            p.MinimumValue = "1";
            p.MaximumValue = "2";
            p.Validate();
            p.ErrorMessage    = "aw shucks";
            p.Display         = ValidatorDisplay.Static;
            p.Enabled         = true;
            p.EnableViewState = true;

            Assert.AreEqual("<span style=\"color:Red;\">aw shucks</span>", p.Render(), "R1");
        }
示例#2
0
		public void Render () {
			RangeValidatorTestClass p;
			TextBox			t;

			p = new RangeValidatorTestClass();
			StartValidationTest(p);
			p.Type = ValidationDataType.Integer;

			Assert.AreEqual (false, p.UpRender(), "R0");

			t = SetValidationTextBox("textbox", "3");

			p.MinimumValue = "1";
			p.MaximumValue = "2";
			p.Validate();
			p.ErrorMessage = "aw shucks";
			p.Display = ValidatorDisplay.Static;
			p.Enabled = true;
			p.EnableViewState = true;

			Assert.AreEqual("<span style=\"color:Red;\">aw shucks</span>", p.Render(), "R1");
		}