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 ()
{
}
[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");
[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;
[Test]
public void AllowNew ()
{
- if (TestHelper.RunningOnUnix) {
- Assert.Ignore ("Fails at the moment");
- }
-
BindingSource source = new BindingSource ();
source.AllowNew = false;
// public constructor."
public void AllowNew_FixedSize ()
{
- if (TestHelper.RunningOnUnix) {
- Assert.Ignore ("Fails at the moment");
- }
-
BindingSource source = new BindingSource ();
source.DataSource = new object[10];