Author: rolf
Date: 2007-07-12 12:13:29 -0400 (Thu, 12 Jul 2007)
New Revision: 81880

Modified:
   trunk/mcs/class/System/Test/System.ComponentModel/ChangeLog
   trunk/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs
Log:
* PropertyDescriptorTests.cs: Added GetEditorTest.

Modified: trunk/mcs/class/System/Test/System.ComponentModel/ChangeLog
===================================================================
--- trunk/mcs/class/System/Test/System.ComponentModel/ChangeLog 2007-07-12 
16:11:26 UTC (rev 81879)
+++ trunk/mcs/class/System/Test/System.ComponentModel/ChangeLog 2007-07-12 
16:13:29 UTC (rev 81880)
@@ -1,3 +1,7 @@
+2007-07-12  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * PropertyDescriptorTests.cs: Added GetEditorTest.
+
 2006-05-31  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * LookupBindingPropertiesAttributeTest.cs:

Modified: 
trunk/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs
===================================================================
--- 
trunk/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs    
    2007-07-12 16:11:26 UTC (rev 81879)
+++ 
trunk/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs    
    2007-07-12 16:13:29 UTC (rev 81880)
@@ -11,6 +11,8 @@
 using System.Collections;
 using System.ComponentModel;
 using System.Globalization;
+using System.Drawing.Design;
+using System.ComponentModel.Design;
 
 using NUnit.Framework;
 
@@ -337,5 +339,35 @@
 #endif
                        Assert.AreEqual ("Implicit", p2.DisplayName, "#2");
                }
+
+               [Test]
+               public void GetEditorTest ()
+               {
+                       PropertyDescriptorCollection col;
+                       PropertyDescriptor pd;
+                       UITypeEditor ed;
+
+                       col = TypeDescriptor.GetProperties (typeof 
(GetEditor_test));
+                       pd = col [0];
+                       ed = pd.GetEditor (typeof (UITypeEditor)) as 
UITypeEditor;
+
+                       Assert.IsNotNull (ed, "#01");
+                       Assert.AreEqual (ed.GetType ().Name, "UIEditor", "#02");
+               
+               }
+
+               class GetEditor_test 
+               {
+                       [Editor (typeof (UIEditor), typeof (UITypeEditor))]
+                       public string Property {
+                               get { return "abc"; }
+                               set { }
+                       }
+               }
+
+               class UIEditor : UITypeEditor
+               {
+                       
+               }
        }
 }

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

Reply via email to