public void EnsureDataBound_WithoutDataSourceID() { TestBaseDataList bdl = new TestBaseDataList(); Assert.IsFalse(bdl.DataBindingCalled, "Before EnsureDataBound"); bdl.Ensure(); Assert.IsFalse(bdl.DataBindingCalled, "After EnsureDataBound"); }
public void EnsureDataBound_WithDataSourceID() { XmlDataSource ds = new XmlDataSource(); ds.Data = ""; ds.ID = "mono"; TestBaseDataList bdl = new TestBaseDataList(); Page p = new Page(); bdl.Page = p; p.Controls.Add(ds); p.Controls.Add(bdl); bdl.DataSourceID = "mono"; Assert.IsFalse(bdl.DataBindingCalled, "Before EnsureDataBound"); bdl.Ensure(); Assert.IsFalse(bdl.DataBindingCalled, "After EnsureDataBound"); bdl.BaseOnLoad(EventArgs.Empty); bdl.Ensure(); Assert.IsTrue(bdl.DataBindingCalled, "After BaseOnLoad|RequiresDataBinding"); }
public void EnsureDataBound_WithDataSourceID () { XmlDataSource ds = new XmlDataSource (); ds.Data = ""; ds.ID = "mono"; TestBaseDataList bdl = new TestBaseDataList (); Page p = new Page (); bdl.Page = p; p.Controls.Add (ds); p.Controls.Add (bdl); bdl.DataSourceID = "mono"; Assert.IsFalse (bdl.DataBindingCalled, "Before EnsureDataBound"); bdl.Ensure (); Assert.IsFalse (bdl.DataBindingCalled, "After EnsureDataBound"); bdl.BaseOnLoad (EventArgs.Empty); bdl.Ensure (); Assert.IsTrue (bdl.DataBindingCalled, "After BaseOnLoad|RequiresDataBinding"); }
public void EnsureDataBound_WithoutDataSourceID () { TestBaseDataList bdl = new TestBaseDataList (); Assert.IsFalse (bdl.DataBindingCalled, "Before EnsureDataBound"); bdl.Ensure (); Assert.IsFalse (bdl.DataBindingCalled, "After EnsureDataBound"); }