Author: toshok
Date: 2005-09-01 19:59:28 -0400 (Thu, 01 Sep 2005)
New Revision: 49306

Modified:
   trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlTest.cs
Log:
2005-09-01  Chris Toshok  <[EMAIL PROTECTED]>

        * ListControlTest.cs (DefaultProperties): add tests for TagKey,
        Text, and AppendDataBoundItems.
        (ViewStateContents): add checks for Text and AppendDataBoundItems.



Modified: trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog 
2005-09-01 23:58:08 UTC (rev 49305)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog 
2005-09-01 23:59:28 UTC (rev 49306)
@@ -1,3 +1,9 @@
+2005-09-01  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * ListControlTest.cs (DefaultProperties): add tests for TagKey,
+       Text, and AppendDataBoundItems.
+       (ViewStateContents): add checks for Text and AppendDataBoundItems.
+
 2005-09-01  Raja R Harinath  <[EMAIL PROTECTED]>
 
        * CalendarTest.cs: Remove duplicate using-declarations.

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlTest.cs    
    2005-09-01 23:58:08 UTC (rev 49305)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlTest.cs    
    2005-09-01 23:59:28 UTC (rev 49306)
@@ -74,6 +74,13 @@
                        base.Render (writer);
                        return writer.InnerWriter.ToString ();
                }
+
+#if NET_2_0
+               public HtmlTextWriterTag GetTagKey ()
+               {
+                       return TagKey;
+               }
+#endif
        }
 
        [TestFixture]
@@ -96,6 +103,11 @@
                        Assert.AreEqual (p.SelectedIndex, -1,"A8");
                        Assert.AreEqual (p.SelectedItem, null, "A9");
                        Assert.AreEqual (p.SelectedValue, String.Empty, "A10");
+#if NET_2_0
+                       Assert.IsFalse (p.AppendDataBoundItems, "A11");
+                       Assert.AreEqual (p.Text, "", "A12");
+                       Assert.AreEqual (p.GetTagKey(), 
HtmlTextWriterTag.Select, "A13");
+#endif
                }
 
                [Test]
@@ -236,6 +248,10 @@
                        p.DataTextFormatString = "DataTextFormatString";
                        p.DataValueField = "DataValueField";
                        p.SelectedIndex = 1;
+#if NET_2_0
+                       p.AppendDataBoundItems = true;
+                       p.Text = "Text";
+#endif
 
                        Assert.AreEqual (p.ViewStateValue ("AutoPostBack"), 
false, "A1");
                        Assert.AreEqual (p.ViewStateValue ("DataMember"), 
"DataMember", "A2");
@@ -246,10 +262,18 @@
                                        "DataTextFormatString", "A5");
                        Assert.AreEqual (p.ViewStateValue ("DataValueField"), 
"DataValueField", "A6");
 
+#if NET_2_0
+                       Assert.AreEqual (p.ViewStateValue 
("AppendDataBoundItems"), true, "A7");
+#endif
+
                        // None of these are saved
-                       Assert.AreEqual (p.ViewStateValue ("SelectedIndex"), 
null, "A7");
+                       Assert.AreEqual (p.ViewStateValue ("SelectedIndex"), 
null, "A8");
                        Assert.AreEqual (p.ViewStateValue ("SelectedItem"), 
null, "A9");
-                       Assert.AreEqual (p.ViewStateValue ("SelectedValue"), 
null, "A8");
+                       Assert.AreEqual (p.ViewStateValue ("SelectedValue"), 
null, "A10");
+#if NET_2_0
+                       Assert.AreEqual (p.ViewStateValue ("Text"), null, 
"A11");
+#endif
+
                }
 
                [Test]

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to