fix 2 testcases
authorAndrew Skiba <andrews@mono-cvs.ximian.com>
Mon, 10 Jul 2006 12:16:41 +0000 (12:16 -0000)
committerAndrew Skiba <andrews@mono-cvs.ximian.com>
Mon, 10 Jul 2006 12:16:41 +0000 (12:16 -0000)
svn path=/trunk/mcs/; revision=62392

mcs/class/System.Web/Test/System.Web.Security/ChangeLog
mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTest.cs

index f805c5cb333c4edf1bdc5b7338846368d5b21b9f..13a602a239454ffa4d9469154706784b19d77d61 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-10  Andrew Skiba  <andrews@mainsoft.com>
+
+       * FormsAuthenticationTest.cs: run 2 tests in web context, so they
+       succeed.
+
 2006-05-01  Chris Toshok  <toshok@ximian.com>
 
        * MembershipTest.cs (GeneratePassword): add test for password
index 10375c8251cba12f7c3620d380df5b4959737bc9..467be1d9e918ae988340f5f8005225131b18e5f1 100644 (file)
@@ -14,6 +14,7 @@ using System.Web;
 using System.Web.Security;
 
 using NUnit.Framework;
+using MonoTests.SystemWeb.Framework;
 
 namespace MonoTests.System.Web.Security {
 
@@ -21,10 +22,13 @@ namespace MonoTests.System.Web.Security {
        public class FormsAuthenticationTest {
 
                [Test]
-#if ONLY_1_1
-               [ExpectedException (typeof (NullReferenceException))]
-#endif
+               [Category("NunitWeb")]
                public void DefaultValues ()
+               {
+                       new WebTest(new HandlerInvoker (DefaultValues_delegate)).Run ();
+               }
+
+               static public void DefaultValues_delegate ()
                {
                        // MS use ".ASPXAUTH" while Mono use ".MONOAUTH"
                        string str = FormsAuthentication.FormsCookieName;
@@ -43,15 +47,18 @@ namespace MonoTests.System.Web.Security {
                }
 
                [Test]
-#if ONLY_1_1
-               [ExpectedException (typeof (NullReferenceException))]
-#endif
+               [Category("NunitWeb")]
                public void Initialize ()
+               {
+                       new WebTest(new HandlerInvoker (Initialize_delegate)).Run ();
+               }
+
+               static public void Initialize_delegate ()
                {
                        // calling Initialize without an HttpContext
                        FormsAuthentication.Initialize ();
                        // and that doesn't change the default values
-                       DefaultValues ();
+                       DefaultValues_delegate ();
                }
 
                [Test]