From: Yoni Klain Date: Tue, 7 Nov 2006 10:02:52 +0000 (-0000) Subject: Increase tests' correctness as now they better follow the .NET behavior, and X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=8ae70a53ebc51ecba13b5b1d6a7f27553ddcd967;p=mono.git 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. svn path=/trunk/mcs/; revision=67439 --- diff --git a/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs b/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs index 0435d36036e..4ebe4b6ae70 100644 --- a/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs @@ -59,7 +59,8 @@ namespace MonoTests.System.Web.Hosting { [TestFixture] public class ApplicationHostTest { - [SetUp] public void Setup () + [SetUp] + public void Setup () { try { // @@ -92,7 +93,9 @@ namespace MonoTests.System.Web.Hosting { ApplicationHost.CreateApplicationHost (null, null, null); } - [Test][ExpectedException (typeof (UriFormatException))] + [Test] + [Category ("NotWorking")] + [ExpectedException (typeof (ArgumentException))] public void ConstructorTestNull2 () { // @@ -101,7 +104,9 @@ namespace MonoTests.System.Web.Hosting { ApplicationHost.CreateApplicationHost (null, "/app", "."); } - [Test][ExpectedException (typeof (UriFormatException))] + [Test] + [Category("NotWorking")] + [ExpectedException (typeof (ArgumentNullException))] public void ConstructorTestNull3 () { // diff --git a/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs b/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs index f8076c4dbbd..8e2904063f8 100644 --- a/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs @@ -82,14 +82,14 @@ namespace MonoTests.System.Web.Hosting { 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] diff --git a/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs b/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs index 4a9f762d9a7..6ae556ccfb5 100644 --- a/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs @@ -47,8 +47,8 @@ namespace MonoTests.System.Web.Profile { 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"); } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs index 4e443e6d515..2f2df633ba7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs @@ -33,7 +33,7 @@ using System.Text; 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { FormPoker form = new FormPoker (); form.Page = p; #if NET_2_0 - Assert.AreEqual ("
\r\n\r\n
", form.RenderChildren ().Trim (), "A1"); + HtmlDiff.AssertAreEqual ("
\r\n\r\n
", form.RenderChildren ().Trim (), "A1"); #else - Assert.AreEqual ("", form.RenderChildren ().Trim (), "A1"); + HtmlDiff.AssertAreEqual ("", form.RenderChildren ().Trim (), "A1"); #endif } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs index fd9a66a97cf..10d6549e76a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs @@ -32,7 +32,7 @@ using System.IO; 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { } [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); diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs index 7aa978ab253..7dc44005b4f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs @@ -31,7 +31,7 @@ using System; 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.AreEqual (1, c.Attributes.Count, "Attributes.Count after"); } - [Test] + [Test] public void Render () { TestHtmlInputCheckBox c = new TestHtmlInputCheckBox (); @@ -101,9 +101,9 @@ namespace MonoTests.System.Web.UI.HtmlControls { s = c.Render (); #if NET_2_0 - Assert.AreEqual ("", s); + HtmlDiff.AssertAreEqual ("", s, "Render fail"); #else - Assert.AreEqual ("", s); + HtmlDiff.AssertAreEqual ("", s, "Render fail"); #endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs index 1fa9bc33f66..a741ae1a9c7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputControlTest.cs @@ -31,7 +31,7 @@ using System; 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { 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"); } } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs index b3d18806b5a..80f68f725b5 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs @@ -32,7 +32,7 @@ using System.Collections.Specialized; 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { #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 @@ namespace MonoTests.System.Web.UI.HtmlControls { 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 diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs index d95c23406e5..4d56374cf92 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs @@ -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 @@ namespace MonoTests.System.Web.UI.HtmlControls { meta.Content = "Content"; meta.HttpEquiv = "Equiv"; meta.Scheme = "Scheme"; - Assert.AreEqual ("", meta.Render(), "A1"); + HtmlDiff.AssertAreEqual ("", meta.Render(), "A1"); } [Test] @@ -100,4 +100,4 @@ namespace MonoTests.System.Web.UI.HtmlControls { } } -#endif +#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs index 1e938449fd0..df6226858a9 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs @@ -190,10 +190,10 @@ namespace MonoTests.System.Web.UI.HtmlControls { 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 @@ namespace MonoTests.System.Web.UI.HtmlControls { ta.Name = "mono"; ta.Value = "value"; // value is out - Assert.AreEqual ("", ta.Render ()); + HtmlDiff.AssertAreEqual ("", ta.Render (),"Render #1"); ta.ID = "go"; - Assert.AreEqual ("", ta.Render ()); + HtmlDiff.AssertAreEqual ("", ta.Render (),"Render #2"); } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs index 449e3ca90b7..ff5c0a3c3ef 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs @@ -139,10 +139,10 @@ namespace MonoTests.System.Web.UI.WebControls 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 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual ("", sql.FilterExpression, "A26"); Assert.AreEqual ("", sql.DataFile, "A27"); } - } - + } } #endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs index ec3fc4a54d6..cc9c428b114 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs @@ -36,6 +36,7 @@ using System.IO; 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 @@ namespace MonoTests.System.Web.UI.WebControls } [Test] + [Category ("NotWorking")] public void SelectDateProperty () { PokerCalendar c = new PokerCalendar (); @@ -256,7 +258,7 @@ namespace MonoTests.System.Web.UI.WebControls 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 @@ namespace MonoTests.System.Web.UI.WebControls [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 @@ namespace MonoTests.System.Web.UI.WebControls */ [Test] + [Category ("NotWorking")] public void HaveBaseAttributes () { PokerCalendar p = new PokerCalendar (); @@ -660,8 +664,8 @@ namespace MonoTests.System.Web.UI.WebControls 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"); } } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs index 03cfa0b602d..ea51aa3c5b9 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs @@ -118,6 +118,7 @@ namespace MonoTests.System.Web.UI.WebControls HtmlTextWriter tw = new HtmlTextWriter (sw); Page page = new Page (); + page.EnableEventValidation = false; ImageButton b = new ImageButton (); page.Controls.Add (b); page.RenderControl (tw); diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs index 027cd0fe00d..dafe27f9a35 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs @@ -39,18 +39,62 @@ using NUnit.Framework; 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 TestLogin : Login { + } + + public class LayoutTemplate :WebControl, ITemplate + { + TextBox user; + TextBox pass; + CheckBox remme; + Button login; + Literal failure; + + 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 @@ namespace MonoTests.System.Web.UI.WebControls { 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] diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs index 8c20cee44fd..2e58b86f317 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs @@ -167,6 +167,7 @@ namespace MonoTests.System.Web.UI.WebControls { 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); diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs index f2fe93dab6a..2ce56fd7098 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs @@ -68,11 +68,11 @@ namespace MonoTests.System.Web.UI.WebControls 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 @@ namespace MonoTests.System.Web.UI.WebControls [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 @@ namespace MonoTests.System.Web.UI.WebControls 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 @@ namespace MonoTests.System.Web.UI.WebControls 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 diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs index 17cb93ae3dc..b3ce60a3f82 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs @@ -77,31 +77,31 @@ namespace MonoTests.System.Web.UI.WebControls 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 @@ namespace MonoTests.System.Web.UI.WebControls 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] diff --git a/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs index 9d6847c0050..80bff8f59d5 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs @@ -113,32 +113,35 @@ namespace MonoTests.System.Web.UI { } [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 () { diff --git a/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs index dc97004d26a..c155aa7e9be 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs @@ -164,11 +164,11 @@ namespace MonoTests.System.Web.UI } [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); diff --git a/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs b/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs index a1bcbcdba74..20ff2a166b7 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs @@ -35,6 +35,8 @@ using NUnit.Framework; using System.Diagnostics; using MonoTests.SystemWeb.Framework; using System.IO; +using System.Threading; +using System.Globalization; namespace MonoTests.System.Web { @@ -135,11 +137,13 @@ namespace MonoTests.System.Web { [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] diff --git a/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs b/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs index 625416b3d35..4acee5a9771 100644 --- a/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs +++ b/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs @@ -65,13 +65,24 @@ namespace MonoTests.System.Web 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 @@ namespace MonoTests.System.Web 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"); } } } diff --git a/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs b/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs index 97da75898f2..8fe0cd7d3a6 100644 --- a/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs +++ b/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs @@ -66,7 +66,8 @@ namespace MonoTests.System.Web { } [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 @@ namespace MonoTests.System.Web { } [Test] - [ExpectedException (typeof (ArgumentNullException))] + [Category ("NotWorking")] + [ExpectedException (typeof (ArgumentException))] public void Combine2 () { VPU.Combine ("something", null); @@ -269,14 +271,14 @@ namespace MonoTests.System.Web { } [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 @@ namespace MonoTests.System.Web { { 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 @@ namespace MonoTests.System.Web { } } -#endif - +#endif +