Author: calberto
Date: 2008-02-10 21:28:00 -0500 (Sun, 10 Feb 2008)
New Revision: 95412

Modified:
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
Log:
2008-02-10  Carlos Alberto Cortez <[EMAIL PROTECTED]>

        * BindingTest.cs: New test for changes in data source property (with
        a 'PropertyChange' event).



Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs  
    2008-02-11 02:26:34 UTC (rev 95411)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs  
    2008-02-11 02:28:00 UTC (rev 95412)
@@ -236,7 +236,26 @@
                        Assert.AreEqual (DBNull.Value, c.Tag, "1");
                }
 
+               // For this case to work, the data source property needs
+               // to have an associated 'PropertyChanged' event.
                [Test]
+               public void DataSourcePropertyChanged ()
+               {
+                       Control c = new Control ();
+                       c.BindingContext = new BindingContext ();
+                       c.CreateControl ();
+
+                       MockItem item = new MockItem ("A", 0);
+                       Binding binding = new Binding ("Text", item, "Text");
+
+                       c.DataBindings.Add (binding);
+                       Assert.AreEqual ("A", c.Text, "#A1");
+
+                       item.Text = "B";
+                       Assert.AreEqual ("B", c.Text, "#B1");
+               }
+
+               [Test]
                [Category ("NotWorking")]
                public void IsBindingTest ()
                {

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2008-02-11 02:26:34 UTC (rev 95411)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2008-02-11 02:28:00 UTC (rev 95412)
@@ -1,3 +1,8 @@
+2008-02-10  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+       * BindingTest.cs: New test for changes in data source property (with
+       a 'PropertyChange' event).
+
 2008-02-08  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * BindingTest.cs: Add new cases for DataSourceUpdateMode test,

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

Reply via email to