* TemplateControl.jvm.cs: ParseControl not supported, added limited implementation...
[mono.git] / mcs / class / System.Web / Test / System.Web.UI / TemplateControlTest.cs
index 132d33f4d98966065ad1a3316a5fffe7d8c988ae..0e0c2ee14a368bce7caba7341e62c7bf325e245b 100644 (file)
@@ -119,14 +119,14 @@ namespace MonoTests.System.Web.UI.WebControls
                        Assert.AreEqual (true, t.DoSupportAutoEvents, "SupportAutoEvents");
                }
 
+#if TARGET_JVM
                [Test]
-               [Category ("NotWorking")]
                public void TemplateControl_DefaultPropertyNotWorking ()
                {
                        PokerTemplateControl t = new PokerTemplateControl ();
-                       //Does not have definition
-                       //Assert.AreEqual (null, t.AppRelativeVirtualPath, "AppRelativeVirtualPath");
+                       Assert.AreEqual (null, t.AppRelativeVirtualPath, "AppRelativeVirtualPath");
                }
+#endif
 
                [Test]
                [Category ("NunitWeb")]
@@ -163,6 +163,7 @@ namespace MonoTests.System.Web.UI.WebControls
 
                [Test]
                [Category ("NotWorking")]
+               [Category ("NotDotNet")]  // Must be removed after adding AppRelativeVirtualPath property
                [Category ("NunitWeb")]
                public void TemplateControl_ParseControl ()
                {
@@ -194,12 +195,12 @@ namespace MonoTests.System.Web.UI.WebControls
                public void TemplateControl_TestDeviceFilter ()
                {
                        //Have no definition to TestDeviceFilter
-                       WebTest t = new WebTest (PageInvoker.CreateOnLoad (TestDeviceFilter));
+                       WebTest t = new WebTest (PageInvoker.CreateOnLoad (DoTestDeviceFilter));
                        string html = t.Run ();
                        
                }
 
-               public static void TestDeviceFilter (Page p)
+               public static void DoTestDeviceFilter (Page p)
                {
                        //Have no definition to TestDeviceFilter
                        // bool res = p.TestDeviceFilter("test");
@@ -219,7 +220,6 @@ namespace MonoTests.System.Web.UI.WebControls
 
                [Test]
                [Category ("NunitWeb")]
-               [Category ("NotWorking")]
                public void TemplateControl_Eval ()
                {
                        // In this test aspx page used as template control
@@ -326,11 +326,11 @@ namespace MonoTests.System.Web.UI.WebControls
 
 
                [Test]
-               [Category ("NotWorking")]
                [ExpectedException (typeof (InvalidOperationException))]
                public void TemplateControl_EvalException ()
                {
                        PokerTemplateControl t = new PokerTemplateControl ();
+                       t.Page = new Page ();
                        t.DoEval (null);
                }
                
@@ -342,26 +342,24 @@ namespace MonoTests.System.Web.UI.WebControls
                        t.LoadControl (null);
                }
 
+
+#if TARGET_JVM
                [Test]
-               [Category ("NotWorking")]
                [ExpectedException(typeof(ArgumentNullException))]
                public void TemplateControl_AppRelativeVirtualPathException1 ()
                {
                        PokerTemplateControl t = new PokerTemplateControl ();
-                       //Does not have definition
-                       //t.AppRelativeVirtualPath = null;
+                       t.AppRelativeVirtualPath = null;
                }
 
                [Test]
-               [Category ("NotWorking")]
                [ExpectedException (typeof (ArgumentException))]
                public void TemplateControl_AppRelativeVirtualPathException2 ()
                {
                        PokerTemplateControl t = new PokerTemplateControl ();
-                       //Does not have definition
-                       //t.AppRelativeVirtualPath = "fake";
+                       t.AppRelativeVirtualPath = "fake";
                }
-
+#endif
                [TestFixtureTearDown]
                public void TearDown ()
                {