Parcourir la source

* TemplateControl.jvm.cs: ParseControl not supported, added limited implementation if TestDeviceFilter
* TemplateControlTest.cs: removed not working attributes, TARGET_JVM for AppRelativeVirtualPath property tests

svn path=/trunk/mcs/; revision=71513

Vladimir Krasnov il y a 19 ans
Parent
commit
bd11c8343c

+ 5 - 0
mcs/class/System.Web/System.Web.UI/ChangeLog

@@ -1,3 +1,8 @@
+2007-01-23  Vladimir Krasnov  <[email protected]>
+
+	* TemplateControl.jvm.cs: ParseControl not supported, added limited
+	implementation if TestDeviceFilter
+
 2007-01-22  Konstantin Triger <[email protected]>
 
 	* ClientScriptManager.cs: ensure the callback client script is

+ 8 - 2
mcs/class/System.Web/System.Web.UI/TemplateControl.jvm.cs

@@ -255,10 +255,16 @@ namespace System.Web.UI {
 				eh (this, e);
 		}
 
-		[MonoTODO]
+		[MonoNotSupported ("Not supported")]
 		public Control ParseControl (string content)
 		{
-			return null;
+			throw new NotSupportedException ();
+		}
+
+		[MonoLimitation ("Always returns false")]
+		public virtual bool TestDeviceFilter (string filterName)
+		{
+			return false;
 		}
 
 		[MonoTODO]

+ 5 - 0
mcs/class/System.Web/Test/System.Web.UI/ChangeLog

@@ -1,3 +1,8 @@
+2007-01-23  Vladimir Krasnov  <[email protected]>
+
+	* TemplateControlTest.cs: removed not working attributes, TARGET_JVM
+	for AppRelativeVirtualPath property tests
+
 2006-01-15  Ilya Kharmatsky    <ilya-at-decode-systems.com>
 	
 	* ControlTest.cs: removed NotWorking attributes,

+ 13 - 17
mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs

@@ -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")]
@@ -195,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");
@@ -220,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
@@ -327,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);
 		}
 		
@@ -343,27 +342,24 @@ namespace MonoTests.System.Web.UI.WebControls
 			t.LoadControl (null);
 		}
 
-		
+
+#if TARGET_JVM
 		[Test]
-		[Category ("NotWorking")]
-		//[ExpectedException(typeof(ArgumentNullException))]
+		[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))]
+		[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 ()
 		{