System\Windows\Forms\ControlBindingsCollectionTests.cs (4)
143Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true);
229Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true));
243Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true));
260Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true));