2008-03-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Mon, 24 Mar 2008 23:10:54 +0000 (23:10 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Mon, 24 Mar 2008 23:10:54 +0000 (23:10 -0000)
* BindingSourceTest.cs: Re-activate some tests and also add a new
ones.

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

mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingSourceTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog

index d5deee7f2e0702780b726843185ec0ce77781872..086b877e634f592a8a7fe955d8316958ed1cfb7f 100644 (file)
@@ -338,6 +338,20 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
                        Assert.AreEqual (ListChangedType.ItemChanged, type, "3");
                }
 
+               [Test]
+               public void Remove ()
+               {
+                       BindingSource source = new BindingSource ();
+
+                       List<string> list = new List<string> ();
+                       list.Add ("A");
+                       source.DataSource = list;
+                       Assert.AreEqual (1, source.List.Count, "1");
+
+                       source.Remove ("A");
+                       Assert.AreEqual (0, list.Count, "2");
+               }
+
                [Test]
                public void ResetBindings ()
                {
@@ -594,12 +608,21 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
                }
 
                [Test]
-               public void AddNew ()
+               public void Add ()
                {
-                       if (TestHelper.RunningOnUnix) {
-                               Assert.Ignore ("Fails at the moment");
-                       }
+                       BindingSource source = new BindingSource ();
+
+                       source.Add (new object ());
+                       Assert.AreEqual (1, source.List.Count, "1");
+
+                       source.DataSource = new List<string> ();
+                       source.Add ("A");
+                       Assert.AreEqual (1, source.List.Count, "2");
+               }
 
+               [Test]
+               public void AddNew ()
+               {
                        BindingSource source = new BindingSource ();
                        source.AddNew ();
                        Assert.AreEqual (1, source.Count, "1");
@@ -608,10 +631,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
                [Test]
                public void AddNew_NonBindingList ()
                {
-                       if (TestHelper.RunningOnUnix) {
-                               Assert.Ignore ("Fails at the moment");
-                       }
-
                        IList list = new List<object> ();
                        BindingSource source = new BindingSource ();
                        source.DataSource = list;
@@ -642,10 +661,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
                [Test]
                public void AllowNew ()
                {
-                       if (TestHelper.RunningOnUnix) {
-                               Assert.Ignore ("Fails at the moment");
-                       }
-
                        BindingSource source = new BindingSource ();
                        source.AllowNew = false;
 
@@ -664,10 +679,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
                // public constructor."
                public void AllowNew_FixedSize ()
                {
-                       if (TestHelper.RunningOnUnix) {
-                               Assert.Ignore ("Fails at the moment");
-                       }
-
                        BindingSource source = new BindingSource ();
                        source.DataSource = new object[10];
 
index 17ddcbeb9e07f1a6fba38e9149269ba12e69443f..b5e8a043ecadef8283e2970eb1d07149cf174d34 100644 (file)
@@ -1,3 +1,8 @@
+2008-03-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * BindingSourceTest.cs: Re-activate some tests and also add a new
+       ones.
+
 2008-03-24  Jonathan Pobst  <monkey@jpobst.com>
 
        * DataGridViewTest.cs: Add test for bug #331649.