public void Defaults()
        {
            RangeValidatorTestClass p;

            p = new RangeValidatorTestClass();

            Assert.AreEqual(String.Empty, p.ControlToValidate, "D1");
            Assert.AreEqual(String.Empty, p.MinimumValue, "D2");
            Assert.AreEqual(String.Empty, p.MaximumValue, "D3");
            Assert.AreEqual(true, p.EnableClientScript, "D4");
            Assert.AreEqual(false, p.UpRender(), "D5");
        }
        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");
        }
Exemple #3
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");
		}
Exemple #4
0
		public void Defaults ()
		{
			RangeValidatorTestClass p;

			p = new RangeValidatorTestClass();

			Assert.AreEqual (String.Empty, p.ControlToValidate, "D1");
			Assert.AreEqual (String.Empty, p.MinimumValue, "D2");
			Assert.AreEqual (String.Empty, p.MaximumValue, "D3");
			Assert.AreEqual (true, p.EnableClientScript, "D4");
			Assert.AreEqual (false, p.UpRender(), "D5");
		}