Beispiel #1
0
        public void RenderAttributes()
        {
            TestHtmlTextArea ta = new TestHtmlTextArea();

            ta.Cols  = 4;
            ta.Rows  = 2;
            ta.Name  = "mono";
            ta.Value = "value";
            // value is out
            HtmlDiff.AssertAreEqual("<dummy name cols=\"4\" rows=\"2\" />", ta.RenderAttributes(), "RenderAttributes failed #1");

            ta.ID = "go";
            HtmlDiff.AssertAreEqual("<dummy name=\"go\" id=\"go\" cols=\"4\" rows=\"2\" />", ta.RenderAttributes(), "RenderAttributes failed #2");
        }
        [Category("NotDotNet")]          // Implementation details changes : Control name will diffrent.
        public void RenderName1()
        {
            UserControl ctrl = new UserControl();

            ctrl.ID = "UC";
            Page page = new Page();

            page.EnableEventValidation = false;
            TestHtmlTextArea ta = new TestHtmlTextArea();

            page.Controls.Add(ctrl);
            ctrl.Controls.Add(ta);
            ta.Name = "mono";
            ta.ID   = "go";
            string expected = "<dummy name=\"UC$go\" id=\"UC_go\" />";

            Assert.AreEqual(expected, ta.RenderAttributes());
        }
Beispiel #3
0
		[Category ("NotDotNet")] // Implementation details changes : Control name will diffrent.
		public void RenderName1 ()
		{
			UserControl ctrl = new UserControl ();
			ctrl.ID = "UC";
			Page page = new Page ();
			page.EnableEventValidation = false;
			TestHtmlTextArea ta = new TestHtmlTextArea ();
			page.Controls.Add (ctrl);
			ctrl.Controls.Add (ta);
			ta.Name = "mono";
			ta.ID = "go";
			string expected = "<dummy name=\"UC$go\" id=\"UC_go\" />";
			Assert.AreEqual (expected, ta.RenderAttributes ());
		}
Beispiel #4
0
		public void RenderAttributes ()
		{
			TestHtmlTextArea ta = new TestHtmlTextArea ();
			ta.Cols = 4;
			ta.Rows = 2;
			ta.Name = "mono";
			ta.Value = "value";
			// value is out
			HtmlDiff.AssertAreEqual ("<dummy name cols=\"4\" rows=\"2\" />", ta.RenderAttributes (), "RenderAttributes failed #1");

			ta.ID = "go";
			HtmlDiff.AssertAreEqual ("<dummy name=\"go\" id=\"go\" cols=\"4\" rows=\"2\" />", ta.RenderAttributes (), "RenderAttributes failed #2");
		}