Author: calberto
Date: 2008-02-11 15:12:44 -0500 (Mon, 11 Feb 2008)
New Revision: 95462

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-11  Carlos Alberto Cortez <[EMAIL PROTECTED]>

        * BindingTest.cs: New test for 2.0 DataSourceNullValue property -
        which is not working by now (but should guide us to correctly
        implement some missing features in data binding).



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 20:07:58 UTC (rev 95461)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs  
    2008-02-11 20:12:44 UTC (rev 95462)
@@ -404,6 +404,29 @@
                        c.Text = "D";
                        Assert.AreEqual ("C", item.Text, "#E1");
                }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void DataSourceNullValueTest ()
+               {
+                       Control c = new Control ();
+                       c.BindingContext = new BindingContext ();
+                       c.CreateControl ();
+
+                       ChildMockItem item = new ChildMockItem ();
+                       item.ObjectValue = "A";
+                       Binding binding = new Binding ("Tag", item, 
"ObjectValue");
+                       binding.DataSourceNullValue = "NonNull";
+
+                       c.DataBindings.Add (binding);
+                       Assert.AreEqual (c.Tag, "A", "#A1");
+
+                       // Since Tag property doesn't have a 
+                       // TagChanged event, we need to force an update
+                       c.Tag = null;
+                       binding.WriteValue ();
+                       Assert.AreEqual (item.ObjectValue, "NonNull", "#B1");
+               }
 #endif
        }
 

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 20:07:58 UTC (rev 95461)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2008-02-11 20:12:44 UTC (rev 95462)
@@ -1,3 +1,9 @@
+2008-02-11  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+       * BindingTest.cs: New test for 2.0 DataSourceNullValue property -
+       which is not working by now (but should guide us to correctly
+       implement some missing features in data binding).
+
 2008-02-10  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * BindingTest.cs: New test for changes in data source property (with

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

Reply via email to