[asp.net] HtmlForum.Name rendering updates + test updates
[mono.git] / mcs / class / System.Web / Test / System.Web.UI.HtmlControls / HtmlContainerControlTest.cs
index 4d0a42db3e9d6c3270d6516bf3e92a374d82331c..2c8cbbff02f3c9576f311b2f4a29c9c4149c2ecc 100644 (file)
@@ -63,6 +63,48 @@ namespace MonoTests.System.Web.UI.HtmlControls {
                        Assert.AreEqual (0, cc.Attributes.Count, "Attributes.Count-2");
                }
 
+               [Test]
+               public void InnerText () {
+                       HtmlButton c = new HtmlButton ();
+                       DataBoundLiteralControl db = new DataBoundLiteralControl (1, 0);
+                       db.SetStaticString (0, "FFF");
+                       c.Controls.Add (db);
+                       Assert.AreEqual ("FFF", c.InnerText);
+               }
+
+               [Test]
+               [ExpectedException (typeof (HttpException))]
+               public void InnerText2 () {
+                       HtmlButton c = new HtmlButton ();
+                       DesignerDataBoundLiteralControl x = new DesignerDataBoundLiteralControl ();
+                       x.Text = "FFF";
+                       c.Controls.Add (x);
+                       string s = c.InnerText;
+               }
+
+               [Test]
+               public void InnerText3 () {
+                       HtmlButton c = new HtmlButton ();
+                       LiteralControl x = new LiteralControl ();
+                       x.Text = "FFF";
+                       c.Controls.Add (x);
+                       Assert.AreEqual("FFF", c.InnerText);
+               }
+
+               [Test]
+               [ExpectedException (typeof (HttpException))]
+               public void InnerText4 () {
+                       HtmlButton c = new HtmlButton ();
+                       LiteralControl x = new LiteralControl ();
+                       x.Text = "FFF";
+                       c.Controls.Add (x);
+                       LiteralControl x2 = new LiteralControl ();
+                       x2.Text = "BBB";
+                       c.Controls.Add (x2);
+
+                       string s = c.InnerText;
+               }
+
                [Test]
                public void NullProperties ()
                {