Author: yonik
Date: 2006-11-07 05:02:52 -0500 (Tue, 07 Nov 2006)
New Revision: 67439

Modified:
   trunk/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs
   
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs
   
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs
   
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs
   
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs
   
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs
   
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs
   
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs
   
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs
   trunk/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs
   trunk/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs
   trunk/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs
Log:
Increase tests' correctness as now they better follow the .NET behavior, and 
Cleanup the ondotnet target of the System.Web 2.0 test suite (0 failures), 
making it an efficient reference point for new tests verification. 


Modified: trunk/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs       
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs       
2006-11-07 10:02:52 UTC (rev 67439)
@@ -35,6 +35,8 @@
 using System.Diagnostics;
 using MonoTests.SystemWeb.Framework;
 using System.IO;
+using System.Threading;
+using System.Globalization;
 
 namespace MonoTests.System.Web {
 
@@ -135,11 +137,13 @@
                [Test]
                public void Test_QueryStringDecoding()
                {
+                       // Note: The string to encode must exist in default 
encoding language 
+                       // \r - will exist in all encodings
                        string url = "http://www.gnome.org/";;
-                       string qs = "umlaut=" + HttpUtility.UrlEncode("\u00e4", 
Encoding.Default);
+                       string qs = "umlaut=" + HttpUtility.UrlEncode("\r", 
Encoding.Default);
 
                        HttpRequest r = new HttpRequest ("file", url, qs);
-                       Assert.AreEqual("\u00e4", r.QueryString["umlaut"]);
+                       Assert.AreEqual ("\r", r.QueryString["umlaut"]);
                }
 
                [Test]

Modified: trunk/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs       
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs       
2006-11-07 10:02:52 UTC (rev 67439)
@@ -65,13 +65,24 @@
        public class SiteMapNodeTest
        {
                [Test]
-               [Category ("NotWorking")]
+        [Category ("NotWorking")]
                public void Node_Null_Attrib_equals ()
                {
+            // Note: dot.net implementation dosn't compare attributes
                        SiteMapNode node = new SiteMapNode (new DummyProvider 
(), "", "", "", null, null, null, null, null);
                        SiteMapNode node1 = new SiteMapNode (new DummyProvider 
(), "", "", "", null, null, null, null, null);
                        SiteMapNode node2 = new SiteMapNode (new DummyProvider 
(), "", "", "", null, null, new NameValueCollection (), null, null);
                        Assert.IsTrue (node.Equals (node1), "both nodes have 
attrib=null");
+                       Assert.IsTrue (node.Equals (node2), "one node has 
attrib=null");
+               }
+
+               [Test]
+               public void Node_equals ()
+               {
+                       SiteMapNode node = new SiteMapNode (new DummyProvider 
(), "Node", "1", "", null, null, null, null, null);
+                       SiteMapNode node1 = new SiteMapNode (new DummyProvider 
(), "Node", "1", "", null, null, null, null, null);
+                       SiteMapNode node2 = new SiteMapNode (new DummyProvider 
(), "Node", "2", "", null, null, new NameValueCollection (), null, null);
+                       Assert.IsTrue (node.Equals (node1), "both nodes have 
attrib=null");
                        Assert.IsFalse (node.Equals (node2), "one node has 
attrib=null");
                }
 
@@ -83,14 +94,16 @@
                        SiteMapNode node1 = new SiteMapNode (new DummyProvider 
(), "", "", "", null, null, null, null, null);
                        SiteMapNode node2 = new SiteMapNode (new DummyProvider 
(), "", "", "", null, new int[] { }, null, null, null);
                        Assert.IsTrue (node.Equals (node1));
-                       Assert.IsFalse (node.Equals (node2));
+                       Assert.IsTrue (node.Equals (node2));
                }
 
                [Test]
                public void Node_Null_Attrib_clone ()
                {
                        SiteMapNode node = new SiteMapNode (new DummyProvider 
(), "", "", "", null, null, null, null, null);
-                       node.Clone ();
+                       SiteMapNode copy = node.Clone ();
+                       Assert.IsNotNull (copy, "Node not created");
+                       Assert.AreEqual (copy, node, "Cloning failed");
                }
        }
 }

Modified: trunk/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs        
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs        
2006-11-07 10:02:52 UTC (rev 67439)
@@ -66,7 +66,8 @@
                }
 
                [Test]
-               [ExpectedException (typeof (ArgumentNullException))]
+               [Category ("NotWorking")]
+               [ExpectedException (typeof (ArgumentException))]
                public void Combine_ArgException2 ()
                {
                        Assert.AreEqual ("hi/there", VPU.Combine ("hi/there", 
null), "A1");
@@ -255,7 +256,8 @@
                }
 
                [Test]
-               [ExpectedException (typeof (ArgumentNullException))]
+               [Category ("NotWorking")]
+               [ExpectedException (typeof (ArgumentException))]
                public void Combine2 ()
                {
                        VPU.Combine ("something", null);
@@ -269,14 +271,14 @@
                }
                
                [Test]
-               [ExpectedException (typeof (ArgumentException))]
+               [ExpectedException (typeof (ArgumentNullException))]
                public void GetDirectory2 ()
                {
                        VPU.GetDirectory ("");
                }
 
                [Test]
-               [ExpectedException (typeof (ArgumentNullException))]
+               [ExpectedException (typeof (ArgumentException))]
                public void GetDirectory3 ()
                {
                        VPU.GetDirectory ("hola");
@@ -310,7 +312,7 @@
                {
                        Assert.AreEqual ("", VPU.GetExtension 
("/direc/somefilenoextension"));
                        Assert.AreEqual ("", VPU.GetExtension ("/"));
-                       Assert.AreEqual (".aspx", VPU.GetDirectory 
("/////direc///somefile.aspx"));
+                       Assert.AreEqual ("/direc/", VPU.GetDirectory 
("/////direc///somefile.aspx"));
                }
 
                [Test]
@@ -438,5 +440,5 @@
        }
 }
 
-#endif
-
+#endif
+

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs   
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs   
2006-11-07 10:02:52 UTC (rev 67439)
@@ -59,7 +59,8 @@
        [TestFixture]
        public class ApplicationHostTest {
 
-               [SetUp] public void Setup ()
+               [SetUp] 
+               public void Setup ()
                {
                        try {
                                //
@@ -92,7 +93,9 @@
                        ApplicationHost.CreateApplicationHost (null, null, 
null);
                }
 
-               [Test][ExpectedException (typeof (UriFormatException))]
+               [Test]
+        [Category ("NotWorking")]
+        [ExpectedException (typeof (ArgumentException))]
                public void ConstructorTestNull2 ()
                {
                        //
@@ -101,7 +104,9 @@
                        ApplicationHost.CreateApplicationHost (null, "/app", 
".");
                }
 
-               [Test][ExpectedException (typeof (UriFormatException))]
+               [Test]
+        [Category("NotWorking")]
+        [ExpectedException (typeof (ArgumentNullException))]
                public void ConstructorTestNull3 ()
                {
                        //

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs   
    2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs   
    2006-11-07 10:02:52 UTC (rev 67439)
@@ -82,14 +82,14 @@
                public void FileExists1 ()
                {
                        DummyVPP dummy = new DummyVPP ();
-                       Assert.IsNull (dummy.FileExists ("hola.aspx"));
+                       Assert.IsFalse (dummy.FileExists ("hola.aspx"));
                }
 
                [Test]
                public void DirectoryExists1 ()
                {
                        DummyVPP dummy = new DummyVPP ();
-                       Assert.IsNull (dummy.DirectoryExists ("hola"));
+                       Assert.IsFalse (dummy.DirectoryExists ("hola"));
                }
 
                [Test]

Modified: trunk/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs       
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs       
2006-11-07 10:02:52 UTC (rev 67439)
@@ -47,8 +47,8 @@
                        ProfileInfoPoker poker = new ProfileInfoPoker();
 
                        Assert.IsNull (poker.UserName, "A1");
-                       Assert.AreEqual (DateTime.MinValue, 
poker.LastUpdatedDate, "A2");
-                       Assert.AreEqual (DateTime.MinValue, 
poker.LastActivityDate, "A3");
+                       Assert.AreEqual (DateTime.MinValue, 
poker.LastUpdatedDate.Date, "A2");
+                       Assert.AreEqual (DateTime.MinValue, 
poker.LastActivityDate.Date, "A3");
                        Assert.IsFalse  (poker.IsAnonymous, "A4");
                        Assert.AreEqual (0, poker.Size, "A5");
                }

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs    
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs    
2006-11-07 10:02:52 UTC (rev 67439)
@@ -113,32 +113,35 @@
                }
 
                [Test]
-               [ExpectedException (typeof (NullReferenceException))]
-               public void InitialNoBag10 ()
+               [Category("NotWorking")]
+               public void InitialNoBag10()
                {
-                       AC ac = new AC (null);
-                       CssStyleCollection css = ac.CssStyle;
-                       int i = css.Count;
+                   AC ac = new AC(null);
+                   CssStyleCollection css = ac.CssStyle;
+                   int i = css.Count;
+                   Assert.AreEqual(0, i, "InitialNoBag10");
                }
 
                [Test]
-               [ExpectedException (typeof (NullReferenceException))]
-               public void InitialNoBag11 ()
+               [Category("NotWorking")]
+               public void InitialNoBag11()
                {
-                       AC ac = new AC (null);
-                       CssStyleCollection css = ac.CssStyle;
-                       ICollection coll = css.Keys;
+                   AC ac = new AC(null);
+                   CssStyleCollection css = ac.CssStyle;
+                   ICollection coll = css.Keys;
+                   Assert.AreEqual(0, coll.Count, "InitialNoBag11");
                }
 
                [Test]
-               [ExpectedException (typeof (NullReferenceException))]
-               public void InitialNoBag12 ()
+               [Category("NotWorking")]
+               public void InitialNoBag12()
                {
-                       AC ac = new AC (null);
-                       CssStyleCollection css = ac.CssStyle;
-                       string v = css ["hola"];
+                   AC ac = new AC(null);
+                   CssStyleCollection css = ac.CssStyle;
+                   string v = css["hola"];
+                   Assert.AreEqual(null, v, "InitialNoBag12");
                }
-
+                       
                [Test]
                public void InitialBag1 ()
                {

Modified: trunk/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs        
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs        
2006-11-07 10:02:52 UTC (rev 67439)
@@ -164,11 +164,11 @@
                }
                
                [Test]
-               [Category ("NotWorking")]
+        [Category ("NotWorking")]
                public void IsViewStateEnabled ()
                {
                        DerivedControl c = new DerivedControl ();
-                       Assert.IsFalse (c.DoIsViewStateEnabled);
+                       Assert.IsTrue (c.DoIsViewStateEnabled);
                        Page p = new Page ();
                        c.Page = p;
                        p.Controls.Add (c);

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs  
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs  
2006-11-07 10:02:52 UTC (rev 67439)
@@ -33,7 +33,7 @@
 using System.Web;
 using System.Web.UI;
 using System.Web.UI.HtmlControls;
-
+using MonoTests.stand_alone.WebHarness;
 using NUnit.Framework;
 
 namespace MonoTests.System.Web.UI.HtmlControls {
@@ -219,9 +219,9 @@
                        FormPoker form = new FormPoker ();
                        form.Page = p;
 #if NET_2_0
-                       Assert.AreEqual ("<div>\r\n<input type=\"hidden\" 
name=\"__VIEWSTATE\" id=\"\r\n__VIEWSTATE\" value=\"\" />\r\n</div>", 
form.RenderChildren ().Trim (), "A1");
+                       HtmlDiff.AssertAreEqual ("<div>\r\n<input 
type=\"hidden\" name=\"__VIEWSTATE\" id=\"\r\n__VIEWSTATE\" value=\"\" 
/>\r\n</div>", form.RenderChildren ().Trim (), "A1");
 #else
-                       Assert.AreEqual ("<input type=\"hidden\" 
name=\"__VIEWSTATE\" value=\"\" />", form.RenderChildren ().Trim (), "A1");
+                       HtmlDiff.AssertAreEqual ("<input type=\"hidden\" 
name=\"__VIEWSTATE\" value=\"\" />", form.RenderChildren ().Trim (), "A1");
 #endif
                }
 

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs
   2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs
   2006-11-07 10:02:52 UTC (rev 67439)
@@ -32,7 +32,7 @@
 using System.Web.UI;
 using System.Web.UI.HtmlControls;
 using System.Web.UI.WebControls;
-
+using MonoTests.stand_alone.WebHarness;
 using NUnit.Framework;
 
 namespace MonoTests.System.Web.UI.HtmlControls {
@@ -137,9 +137,9 @@
 
                        p.DoRenderAttributes (tw);
 #if NET_2_0
-                       Assert.AreEqual (" name type=\"button\" 
ValidationGroup=\"VG\" /", sw.ToString (), "A2");
+                       HtmlDiff.AssertAreEqual (" name type=\"button\" 
ValidationGroup=\"VG\" /", sw.ToString (), "A2");
 #else
-                       Assert.AreEqual (" name type=\"button\" /", sw.ToString 
(), "A2");
+                       HtmlDiff.AssertAreEqual (" name type=\"button\" /", 
sw.ToString (), "A2");
 #endif
                }
 
@@ -182,6 +182,7 @@
                public void RenderOnclick2 ()
                {
                        Page page = new Page ();
+                       page.EnableEventValidation = false;
                        HtmlInputButtonPoker it = new HtmlInputButtonPoker 
("button");
                        page.Controls.Add (it);
                        it.ID = "id1";
@@ -201,22 +202,26 @@
                }
 
                [Test]
-               [Category ("NotWorking")]
+                [Category ("NotWorking")]
                public void RenderOnclick4 ()
                {
                        Page page = new Page ();
+                       page.EnableEventValidation = false;
                        HtmlInputButtonPoker it = new HtmlInputButtonPoker 
("submit");
                        page.Controls.Add (it);
                        it.ID = "id1";
                        it.ServerClick += new EventHandler (EmptyHandler);
                        string rendered = it.RenderToString ();
-                       Assert.IsTrue (rendered.IndexOf ("onclick") == -1, 
"#01");
+                       Assert.IsTrue (rendered.IndexOf ("onclick") != -1, 
"#01");
+                       Assert.IsTrue (rendered.IndexOf ("__doPostBack") != -1, 
"#02");
+                       Assert.IsTrue (rendered.IndexOf ("type=\"submit\"") != 
-1, "#03");
                }
 
                [Test]
                public void RenderOnclick5 ()
                {
                        Page page = new Page ();
+                       page.EnableEventValidation = false;
                        RequiredFieldValidator val = new RequiredFieldValidator 
();
                        val.ControlToValidate = "id1";
                        page.Validators.Add (val);

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs
 2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs
 2006-11-07 10:02:52 UTC (rev 67439)
@@ -31,7 +31,7 @@
 using System.IO;
 using System.Web.UI;
 using System.Web.UI.HtmlControls;
-
+using MonoTests.stand_alone.WebHarness;
 using NUnit.Framework;
 
 namespace MonoTests.System.Web.UI.HtmlControls {
@@ -86,7 +86,7 @@
                        Assert.AreEqual (1, c.Attributes.Count, 
"Attributes.Count after");
                }
 
-               [Test]
+               [Test] 
                public void Render ()
                {
                        TestHtmlInputCheckBox c = new TestHtmlInputCheckBox ();
@@ -101,9 +101,9 @@
                        s = c.Render ();
 
 #if NET_2_0
-                       Assert.AreEqual ("<input name=\"*1*\" type=\"checkbox\" 
id=\"*1*\" checked=\"checked\" />", s);
+                       HtmlDiff.AssertAreEqual ("<input name=\"*1*\" 
id=\"*1*\" type=\"checkbox\" checked=\"checked\" />", s, "Render fail");
 #else
-                       Assert.AreEqual ("<input name=\"*1*\" id=\"*1*\" 
type=\"checkbox\" checked=\"checked\" />", s);
+                       HtmlDiff.AssertAreEqual ("<input name=\"*1*\" 
type=\"checkbox\" id=\"*1*\" checked=\"checked\" />", s, "Render fail");
 #endif
                }
        }

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs
  2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs
  2006-11-07 10:02:52 UTC (rev 67439)
@@ -31,7 +31,7 @@
 using System.IO;
 using System.Web.UI;
 using System.Web.UI.HtmlControls;
-
+using MonoTests.stand_alone.WebHarness;
 using NUnit.Framework;
 
 namespace MonoTests.System.Web.UI.HtmlControls {
@@ -189,13 +189,13 @@
                        ic.Name = "mono";
                        ic.Value = "value";
 
-                       Assert.AreEqual (" name type=\"test\" value=\"value\" 
/", ic.RenderAttributes ());
+                       HtmlDiff.AssertAreEqual (" name type=\"test\" 
value=\"value\" /", ic.RenderAttributes (), "RenderAttributes failed #1");
 
                        ic.ID = "toto";
 #if NET_2_0
-                       Assert.AreEqual (" name=\"toto\" type=\"test\" 
id=\"toto\" value=\"value\" /", ic.RenderAttributes ());
+                       HtmlDiff.AssertAreEqual (" name=\"toto\" id=\"toto\" 
type=\"test\" value=\"value\" /", ic.RenderAttributes (), "RenderAttributes 
failed #2");
 #else
-                       Assert.AreEqual (" name=\"toto\" id=\"toto\" 
type=\"test\" value=\"value\" /", ic.RenderAttributes ());
+                       HtmlDiff.AssertAreEqual(" name=\"toto\" id=\"toto\" 
type=\"test\" value=\"value\" /", ic.RenderAttributes() , "RenderAttributes 
failed #3");
 #endif
                }
 
@@ -214,7 +214,7 @@
                        ic.Value = "s3kr3t";
 
                        // logic to hide password isn't in HtmlInputControl
-                       Assert.AreEqual (" name type=\"password\" 
value=\"s3kr3t\" /", ic.RenderAttributes ());
+                       HtmlDiff.AssertAreEqual (" name type=\"password\" 
value=\"s3kr3t\" /", ic.RenderAttributes (), "Password failed");
                }
        }
 }

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs 
    2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs 
    2006-11-07 10:02:52 UTC (rev 67439)
@@ -32,7 +32,7 @@
 using System.IO;
 using System.Web.UI;
 using System.Web.UI.HtmlControls;
-
+using MonoTests.stand_alone.WebHarness;
 using NUnit.Framework;
 
 namespace MonoTests.System.Web.UI.HtmlControls {
@@ -90,7 +90,7 @@
 #if NET_2_0
                public bool LoadPost (string key, NameValueCollection nvc)
                {
-                       return base.LoadPostData (key, nvc);
+                       return base.LoadPostData(key, nvc);
                }
 
                public void Raise ()
@@ -200,11 +200,11 @@
                        it.Value = "s3kr3t";
 #if NET_2_0
                        // value is there, maybe because a new 
HtmlInputPassword class exists ?
-                       Assert.AreEqual (" name=\"mono\" type=\"password\" 
id=\"mono\" maxlength=\"2\" size=\"4\" value=\"s3kr3t\" /", it.RenderAttributes 
());
+                       HtmlDiff.AssertAreEqual (" name=\"mono\" id=\"mono\" 
type=\"password\" maxlength=\"2\" size=\"4\" value=\"s3kr3t\" /", 
it.RenderAttributes (),"Render failed");
                        Assert.IsFalse (it.ViewStateValueChanged, 
"ViewStateValueChanged");
                        Assert.IsFalse (it.AttributeValueChanged, 
"AttributeValueChanged");
 #else
-                       Assert.AreEqual (" name=\"mono\" id=\"mono\" 
type=\"password\" maxlength=\"2\" size=\"4\" /", it.RenderAttributes ());
+                       HtmlDiff.AssertAreEqual(" name=\"mono\" id=\"mono\" 
type=\"password\" maxlength=\"2\" size=\"4\" /", it.RenderAttributes(),"Render 
failed");
                        Assert.IsTrue (it.ViewStateValueChanged, 
"ViewStateValueChanged");
                        Assert.IsTrue (it.AttributeValueChanged, 
"AttributeValueChanged");
 #endif

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs  
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs  
2006-11-07 10:02:52 UTC (rev 67439)
@@ -28,8 +28,8 @@
 
 #if NET_2_0
 
-using NUnit.Framework;
-
+using NUnit.Framework;
+using MonoTests.stand_alone.WebHarness;
 using System;
 using System.IO;
 using System.Web.UI;
@@ -87,7 +87,7 @@
                        meta.Content = "Content";
                        meta.HttpEquiv = "Equiv";
                        meta.Scheme = "Scheme";
-                       Assert.AreEqual ("<meta name=\"Name\" 
content=\"Content\" http-equiv=\"Equiv\" scheme=\"Scheme\" />", meta.Render(), 
"A1");
+                       HtmlDiff.AssertAreEqual ("<meta name=\"Name\" 
content=\"Content\" http-equiv=\"Equiv\" scheme=\"Scheme\" />", meta.Render(), 
"A1");
                }
 
                [Test]
@@ -100,4 +100,4 @@
        }
 }
 
-#endif
+#endif

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs  
    2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs  
    2006-11-07 10:02:52 UTC (rev 67439)
@@ -190,10 +190,10 @@
                        ta.Name = "mono";
                        ta.Value = "value";
                        // value is out
-                       Assert.AreEqual (" name cols=\"4\" rows=\"2\"", 
ta.RenderAttributes ());
+                       HtmlDiff.AssertAreEqual (" name cols=\"4\" rows=\"2\"", 
ta.RenderAttributes (),"RenderAttributes failed #1");
 
                        ta.ID = "go";
-                       Assert.AreEqual (" name=\"go\" id=\"go\" cols=\"4\" 
rows=\"2\"", ta.RenderAttributes ());
+                       HtmlDiff.AssertAreEqual (" name=\"go\" id=\"go\" 
cols=\"4\" rows=\"2\"", ta.RenderAttributes (),"RenderAttributes failed #2");
                }
 
                [Test]
@@ -223,10 +223,10 @@
                        ta.Name = "mono";
                        ta.Value = "value";
                        // value is out
-                       Assert.AreEqual ("<textarea name cols=\"4\" 
rows=\"2\">value</textarea>", ta.Render ());
+                       HtmlDiff.AssertAreEqual ("<textarea name cols=\"4\" 
rows=\"2\">value</textarea>", ta.Render (),"Render #1");
 
                        ta.ID = "go";
-                       Assert.AreEqual ("<textarea name=\"go\" id=\"go\" 
cols=\"4\" rows=\"2\">value</textarea>", ta.Render ());
+                       HtmlDiff.AssertAreEqual ("<textarea name=\"go\" 
id=\"go\" cols=\"4\" rows=\"2\">value</textarea>", ta.Render (),"Render #2");
                }
 
                [Test]

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs
   2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs
   2006-11-07 10:02:52 UTC (rev 67439)
@@ -139,10 +139,10 @@
                        Assert.AreEqual ("", sql.CacheKeyDependency, "A1");
                        Assert.IsTrue (sql.CancelSelectOnNullParameter, "A2");
                        Assert.AreEqual (ConflictOptions.OverwriteChanges, 
sql.ConflictDetection, "A3");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.DeleteCommandType, "A4");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.InsertCommandType, "A5");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.SelectCommandType, "A6");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.UpdateCommandType, "A7");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.DeleteCommandType, "A4");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.InsertCommandType, "A5");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.SelectCommandType, "A6");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.UpdateCommandType, "A7");
                        Assert.AreEqual ("{0}", 
sql.OldValuesParameterFormatString, "A8");
 
                        // SqlCacheDependency access should raise an exception
@@ -171,8 +171,7 @@
                        Assert.AreEqual ("", sql.FilterExpression, "A26");
                        Assert.AreEqual ("", sql.DataFile, "A27");
                }
-       }
-
+    }
 }
 
 #endif

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs   
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs   
2006-11-07 10:02:52 UTC (rev 67439)
@@ -36,6 +36,7 @@
 using System.Web;
 using System.Web.UI;
 using System.Globalization;
+using System.Threading;
 
 class PokerCalendar : System.Web.UI.WebControls.Calendar {
        public PokerCalendar ()
@@ -246,6 +247,7 @@
                }
 
                [Test]
+        [Category ("NotWorking")]
                public void SelectDateProperty ()
                {
                        PokerCalendar c = new PokerCalendar ();
@@ -256,7 +258,7 @@
                        Assert.AreEqual (today, c.SelectedDate, 
"SelectDateProperty #1");
 
                        c.SelectedDate = now;
-                       Assert.AreEqual (today, c.SelectedDate, 
"SelectDateProperty #2");
+                       Assert.AreEqual (now, c.SelectedDate, 
"SelectDateProperty #2");
                }
 
                [Test]
@@ -608,6 +610,7 @@
                [Test]
                public void TestRenderMonthStartsOnSunday ()
                {
+                       Thread.CurrentThread.CurrentCulture = new CultureInfo 
("en-US", false);
                        PokerCalendar p = new PokerCalendar ();
                        p.TodaysDate = new DateTime (2005, 5, 14);
                        
@@ -652,6 +655,7 @@
                */
 
                [Test]
+        [Category ("NotWorking")] 
                public void HaveBaseAttributes ()
                {
                        PokerCalendar p = new PokerCalendar ();
@@ -660,8 +664,8 @@
                        p.TodaysDate = new DateTime (2005, 8, 4);
                        p.SelectedDate = p.TodaysDate;
                        string s = p.Render();
-                       Assert.IsTrue (s.IndexOf ("adios") != -11, "#01");
-                       Assert.IsTrue (p.CS_Called == false, "#01");
+                       Assert.IsTrue (s.IndexOf ("adios") != -1, "#01");
+                       Assert.IsTrue (p.CS_Called == true, "#02");
                }
        }
 }

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs    
    2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs    
    2006-11-07 10:02:52 UTC (rev 67439)
@@ -118,6 +118,7 @@
                        HtmlTextWriter tw = new HtmlTextWriter (sw);
 
                        Page page = new Page ();
+            page.EnableEventValidation = false;
                        ImageButton b = new ImageButton ();                     
                        page.Controls.Add (b);
                        page.RenderControl (tw);

Modified: trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs      
2006-11-07 09:41:36 UTC (rev 67438)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs      
2006-11-07 10:02:52 UTC (rev 67439)
@@ -39,19 +39,63 @@
 
 namespace MonoTests.System.Web.UI.WebControls {
        
-       public class LoginTemplate : WebControl, ITemplate {
+    public class LoginTemplate :WebControl, ITemplate {
                public LoginTemplate() {
                        ID = "kuku";
-               }
-                       
-               void ITemplate.InstantiateIn(Control container) {
+        }
+        void ITemplate.InstantiateIn(Control container) {
                        container.Controls.Add(this);
                }
+    }
 
-       }
+    public class LayoutTemplate :WebControl, ITemplate
+    {
+        TextBox user;
+        TextBox pass;
+        CheckBox remme;
+        Button login;
+        Literal failure;
 
-       public class TestLogin : Login {
+        public LayoutTemplate(){
+            Buildcontrols();
+            Addtocontainer();
+        }
 
+        #region build
+        public void Buildcontrols()
+        {
+            user = new TextBox();
+            pass = new TextBox();
+            remme = new CheckBox();
+            login = new Button();
+            failure = new Literal();
+
+            ID = "Template";
+            user.ID = "UserName";
+            pass.ID = "Password";
+            remme.ID = "RememberMe";
+            login.ID = "Login";
+            failure.ID = "FailureText";
+        }
+
+        public void Addtocontainer()
+        {
+            this.Controls.Add(user);
+            this.Controls.Add(pass);
+            this.Controls.Add(remme);
+            this.Controls.Add(login);
+            this.Controls.Add(failure);
+        }
+        #endregion
+
+        void ITemplate.InstantiateIn(Control container)
+        {
+            container.Controls.Add(this);
+        }
+    }
+    
+    public class TestLogin : Login {
+
                public string Tag {
                        get { return base.TagName; }
                }
@@ -573,14 +617,26 @@
                        TestLogin l = new TestLogin ();
                        l.FailureAction = (LoginFailureAction) Int32.MinValue;
                }
-               
+
+        [Test]
+        public void LayoutTemplate()
+        {
+            TestLogin l = new TestLogin();
+            l.LayoutTemplate = new LayoutTemplate();
+            l.DoEnsureChildControls();
+            Assert.IsNotNull(l.FindControl("Template"), "LoginTemplate");
+            Assert.IsNotNull(l.FindControl("UserName"), "UserName");
+        }
+
+
                [Test]
-               public void LayoutTemplate ()
+        [Category ("NotWorking")]
+        [ExpectedException(typeof(HttpException))]
+               public void LayoutTemplateException ()
                {
                        TestLogin l = new TestLogin ();
                        l.LayoutTemplate = new LoginTemplate();
                        l.DoEnsureChildControls();
-                       Assert.IsNotNull(l.FindControl("kuku"), 
"LoginTemplate");
                }
 
                [Test]

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs    
    2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs    
    2006-11-07 10:02:52 UTC (rev 67439)
@@ -167,6 +167,7 @@
                        TestRadioButton b2 = new TestRadioButton ();
                        b2.GroupName = "mono";
                        Page p = new Page ();
+            p.EnableEventValidation = false;
                        p.ID = "MyPage";
                        p.Controls.Add (b1);
                        p.Controls.Add (b2);

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs  
    2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs  
    2006-11-07 10:02:52 UTC (rev 67439)
@@ -68,11 +68,11 @@
 
                        Assert.AreEqual ("", sql.CacheKeyDependency, "A1");
                        Assert.IsTrue (sql.CancelSelectOnNullParameter, "A2");
-                       Assert.AreEqual (ConflictOptions.OverwriteChanges, 
sql.ConflictDetection, "A3");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.DeleteCommandType, "A4");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.InsertCommandType, "A5");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.SelectCommandType, "A6");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.UpdateCommandType, "A7");
+                       Assert.AreEqual(ConflictOptions.OverwriteChanges, 
sql.ConflictDetection, "A3");
+                       Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.DeleteCommandType, "A4");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.InsertCommandType, "A5");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.SelectCommandType, "A6");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.UpdateCommandType, "A7");
                        Assert.AreEqual ("{0}", 
sql.OldValuesParameterFormatString, "A8");
                        Assert.AreEqual ("", sql.SqlCacheDependency, "A9");
                        Assert.AreEqual ("", sql.SortParameterName, "A10");
@@ -103,17 +103,17 @@
 
                [Test]
         [Category ("NotWorking")]
-               public void ViewState ()
+        public void ViewState ()
                {
                        SqlPoker sql = new SqlPoker ();
 
                        sql.CacheKeyDependency = "hi";
                        sql.CancelSelectOnNullParameter = false;
                        sql.ConflictDetection = 
ConflictOptions.CompareAllValues;
-                       sql.DeleteCommandType = SqlDataSourceCommandType.Text;
-                       sql.InsertCommandType = SqlDataSourceCommandType.Text;
-                       sql.SelectCommandType = SqlDataSourceCommandType.Text;
-                       sql.UpdateCommandType = SqlDataSourceCommandType.Text;
+                       sql.DeleteCommandType = 
SqlDataSourceCommandType.StoredProcedure;
+            sql.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;
+            sql.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
+            sql.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure;
                        sql.OldValuesParameterFormatString = "{1}";
                        sql.SqlCacheDependency = "hi";
                        sql.SortParameterName = "hi";
@@ -130,10 +130,10 @@
                        Assert.AreEqual ("hi", sql.CacheKeyDependency, "A1");
                        Assert.IsFalse (sql.CancelSelectOnNullParameter, "A2");
                        Assert.AreEqual (ConflictOptions.CompareAllValues, 
sql.ConflictDetection, "A3");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.DeleteCommandType, "A4");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.InsertCommandType, "A5");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.SelectCommandType, "A6");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.UpdateCommandType, "A7");
+                       
Assert.AreEqual(SqlDataSourceCommandType.StoredProcedure, 
sql.DeleteCommandType, "A4");
+            Assert.AreEqual(SqlDataSourceCommandType.StoredProcedure, 
sql.InsertCommandType, "A5");
+            Assert.AreEqual(SqlDataSourceCommandType.StoredProcedure, 
sql.SelectCommandType, "A6");
+            Assert.AreEqual(SqlDataSourceCommandType.StoredProcedure, 
sql.UpdateCommandType, "A7");
                        Assert.AreEqual ("{1}", 
sql.OldValuesParameterFormatString, "A8");
                        Assert.AreEqual ("hi", sql.SqlCacheDependency, "A9");
                        Assert.AreEqual ("hi", sql.SortParameterName, "A10");
@@ -152,28 +152,39 @@
                        sql = new SqlPoker ();
                        sql.LoadFromViewState (state);
 
-                       Assert.AreEqual ("hi", sql.CacheKeyDependency, "B1");
-                       Assert.IsFalse  (sql.CancelSelectOnNullParameter, "B2");
-                       Assert.AreEqual (ConflictOptions.CompareAllValues, 
sql.ConflictDetection, "B3");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.DeleteCommandType, "B4");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.InsertCommandType, "B5");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.SelectCommandType, "B6");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.UpdateCommandType, "B7");
-                       Assert.AreEqual ("{1}", 
sql.OldValuesParameterFormatString, "B8");
-                       Assert.AreEqual ("hi", sql.SqlCacheDependency, "B9");
-                       Assert.AreEqual ("hi", sql.SortParameterName, "B10");
-                       Assert.AreEqual (1, sql.CacheDuration, "B11");
-                       Assert.AreEqual (DataSourceCacheExpiry.Sliding, 
sql.CacheExpirationPolicy, "B12");
-                       Assert.IsTrue   (sql.EnableCaching, "B13");
-                       Assert.AreEqual (SqlDataSourceMode.DataReader, 
sql.DataSourceMode, "B16");
-                       Assert.AreEqual ("DELETE foo", sql.DeleteCommand, 
"B17");
-                       Assert.AreEqual ("INSERT foo", sql.InsertCommand, 
"B20");
-                       Assert.AreEqual ("SELECT foo", sql.SelectCommand, 
"B22");
-                       Assert.AreEqual ("UPDATE foo", sql.UpdateCommand, 
"B24");
-                       Assert.AreEqual ("hi", sql.FilterExpression, "B26");
-               }
-       }
-
+            Assert.AreEqual("", sql.CacheKeyDependency, "B1");
+            Assert.IsTrue(sql.CancelSelectOnNullParameter, "B2");
+            Assert.AreEqual(ConflictOptions.OverwriteChanges, 
sql.ConflictDetection, "B3");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.DeleteCommandType, "B4");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.InsertCommandType, "B5");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.SelectCommandType, "B6");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.UpdateCommandType, "B7");
+            Assert.AreEqual("{0}", sql.OldValuesParameterFormatString, "B8");
+            Assert.AreEqual("", sql.SqlCacheDependency, "B9");
+            Assert.AreEqual("", sql.SortParameterName, "B10");
+            Assert.AreEqual(0, sql.CacheDuration, "B11");
+            Assert.AreEqual(DataSourceCacheExpiry.Absolute, 
sql.CacheExpirationPolicy, "B12");
+            Assert.IsFalse(sql.EnableCaching, "B13");
+            Assert.AreEqual("", sql.ProviderName, "B14");
+            Assert.AreEqual("", sql.ConnectionString, "B15");
+            Assert.AreEqual(SqlDataSourceMode.DataSet, sql.DataSourceMode, 
"B16");
+            Assert.AreEqual("", sql.DeleteCommand, "B17");
+            Assert.IsNotNull(sql.DeleteParameters, "B18");
+            Assert.AreEqual(0, sql.DeleteParameters.Count, "B18.1");
+            Assert.IsNotNull(sql.FilterParameters, "B19");
+            Assert.AreEqual(0, sql.FilterParameters.Count, "B19.1");
+            Assert.AreEqual("", sql.InsertCommand, "B20");
+            Assert.IsNotNull(sql.InsertParameters, "B21");
+            Assert.AreEqual(0, sql.InsertParameters.Count, "B21.1");
+            Assert.AreEqual("", sql.SelectCommand, "B22");
+            Assert.IsNotNull(sql.SelectParameters, "B23");
+            Assert.AreEqual(0, sql.SelectParameters.Count, "B23.1");
+            Assert.AreEqual("", sql.UpdateCommand, "B24");
+            Assert.IsNotNull(sql.UpdateParameters, "B25");
+            Assert.AreEqual(0, sql.UpdateParameters.Count, "B25.1");
+            Assert.AreEqual("", sql.FilterExpression, "B26");
+        }
+    }
 }
 
 #endif

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs
  2006-11-07 09:41:36 UTC (rev 67438)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs
  2006-11-07 10:02:52 UTC (rev 67439)
@@ -77,31 +77,31 @@
                        Assert.IsFalse (sql.CanUpdate,"A7");
                        Assert.AreEqual (ConflictOptions.OverwriteChanges, 
sql.ConflictDetection, "A8");
                        Assert.AreEqual ("", sql.DeleteCommand, "A9");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.DeleteCommandType, "A10");
+                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.DeleteCommandType, "A10");
                        Assert.IsNotNull (sql.DeleteParameters, "A11");
                        Assert.AreEqual (0, sql.DeleteParameters.Count, "A12");
                        Assert.AreEqual ("", sql.FilterExpression, "A13");
                        Assert.IsNotNull (sql.FilterParameters, "A14");
                        Assert.AreEqual (0, sql.FilterParameters.Count, "A15");
                        Assert.AreEqual ("", sql.InsertCommand, "A16");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.InsertCommandType, "A17");
+                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.InsertCommandType, "A17");
                        Assert.IsNotNull (sql.InsertParameters, "A18");
                        Assert.AreEqual (0, sql.InsertParameters.Count, "A19");
                        Assert.AreEqual ("{0}", 
sql.OldValuesParameterFormatString, "A20");
                        Assert.AreEqual ("", sql.SelectCommand, "A21");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.SelectCommandType, "A22");
+                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.SelectCommandType, "A22");
                        Assert.IsNotNull (sql.SelectParameters, "A23");
                        Assert.AreEqual (0, sql.SelectParameters.Count, "A24");
                        Assert.AreEqual ("", sql.SortParameterName, "A25");
                        Assert.AreEqual ("", sql.UpdateCommand, "A26");
-                       Assert.AreEqual 
(SqlDataSourceCommandType.StoredProcedure, sql.UpdateCommandType, "A27");
+                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.UpdateCommandType, "A27");
                        Assert.IsNotNull (sql.UpdateParameters, "A28");
                        Assert.AreEqual (0, sql.UpdateParameters.Count, "A29");
                }
 
                [Test]
-               [Category ("NotWorking")]
-               public void ViewState ()
+        [Category ("NotWorking")]
+        public void ViewState ()
                {
                        SqlDataSource ds = new SqlDataSource ();
                        SqlViewPoker sql = new SqlViewPoker (ds, "DefaultView", 
null);
@@ -141,19 +141,35 @@
                        sql = new SqlViewPoker (ds, "DefaultView", null);
                        sql.LoadFromViewState (state);
 
-                       Assert.IsFalse (sql.CancelSelectOnNullParameter, "B1");
-                       Assert.AreEqual (ConflictOptions.CompareAllValues, 
sql.ConflictDetection, "B2");
-                       Assert.AreEqual ("delete command", sql.DeleteCommand, 
"B3");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.DeleteCommandType, "B4");
-                       Assert.AreEqual ("filter expression", 
sql.FilterExpression, "B5");
-                       Assert.AreEqual ("insert command", sql.InsertCommand, 
"B6");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.InsertCommandType, "B7");
-                       Assert.AreEqual ("{1}", 
sql.OldValuesParameterFormatString, "B8");
-                       Assert.AreEqual ("select command", sql.SelectCommand, 
"B9");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.SelectCommandType, "B10");
-                       Assert.AreEqual ("sort parameter", 
sql.SortParameterName, "B11");
-                       Assert.AreEqual ("update command", sql.UpdateCommand, 
"B12");
-                       Assert.AreEqual (SqlDataSourceCommandType.Text, 
sql.UpdateCommandType, "B13");
+            Assert.IsTrue(sql.CancelSelectOnNullParameter, "B1");
+            Assert.IsFalse(sql.CanDelete, "B2");
+            Assert.IsFalse(sql.CanInsert, "B3");
+            Assert.IsFalse(sql.CanPage, "B4");
+            Assert.IsFalse(sql.CanRetrieveTotalRowCount, "B5");
+            Assert.IsTrue(sql.CanSort, "B6");
+            Assert.IsFalse(sql.CanUpdate, "B7");
+            Assert.AreEqual(ConflictOptions.OverwriteChanges, 
sql.ConflictDetection, "B8");
+            Assert.AreEqual("", sql.DeleteCommand, "B9");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.DeleteCommandType, "B10");
+            Assert.IsNotNull(sql.DeleteParameters, "B11");
+            Assert.AreEqual(0, sql.DeleteParameters.Count, "B12");
+            Assert.AreEqual("", sql.FilterExpression, "B13");
+            Assert.IsNotNull(sql.FilterParameters, "B14");
+            Assert.AreEqual(0, sql.FilterParameters.Count, "B15");
+            Assert.AreEqual("", sql.InsertCommand, "B16");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.InsertCommandType, "B17");
+            Assert.IsNotNull(sql.InsertParameters, "B18");
+            Assert.AreEqual(0, sql.InsertParameters.Count, "B19");
+            Assert.AreEqual("{0}", sql.OldValuesParameterFormatString, "B20");
+            Assert.AreEqual("", sql.SelectCommand, "B21");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.SelectCommandType, "B22");
+            Assert.IsNotNull(sql.SelectParameters, "B23");
+            Assert.AreEqual(0, sql.SelectParameters.Count, "B24");
+            Assert.AreEqual("", sql.SortParameterName, "B25");
+            Assert.AreEqual("", sql.UpdateCommand, "B26");
+            Assert.AreEqual(SqlDataSourceCommandType.Text, 
sql.UpdateCommandType, "B27");
+            Assert.IsNotNull(sql.UpdateParameters, "B28");
+            Assert.AreEqual(0, sql.UpdateParameters.Count, "B29");
                }
 
                [Test]

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

Reply via email to