public void Render() { TestBaseDataList bdl = new TestBaseDataList(); bdl.DataSource = GetDataSource(3); bdl.DataBind(); Assert.AreEqual(String.Empty, bdl.Render()); }
public void DataSourceID() { TestBaseDataList bdl = new TestBaseDataList(); Assert.IsFalse(bdl.IsDataBoundByDataSourceId, "IsBoundUsingDataSourceID-1"); bdl.DataSourceID = "mono"; Assert.IsTrue(bdl.IsDataBoundByDataSourceId, "IsBoundUsingDataSourceID-2"); bdl.DataBind(); Assert.IsTrue(bdl.IsDataBoundByDataSourceId, "IsBoundUsingDataSourceID-3"); }
public void OnDataBinding() { // does DataBind calls base.OnDataBinding (like most sample do) // or does it call the overriden OnDataBinding (which seems logical) TestBaseDataList bdl = new TestBaseDataList(); Assert.IsFalse(bdl.DataBindingCalled, "Before DataBind"); bdl.DataSource = GetDataSource(3); bdl.DataBind(); Assert.IsTrue(bdl.DataBindingCalled, "After DataBind"); }
public void DataSource_WithDataSourceID() { Test2DataSource ds = new Test2DataSource(); ds.ID = "mono"; TestBaseDataList bdl = new TestBaseDataList(); Page p = new Page(); bdl.Page = p; ds.Page = p; p.Controls.Add(ds); p.Controls.Add(bdl); bdl.DataSourceID = "mono"; Assert.IsNotNull(bdl.Data(), "GetData"); bdl.DataSource = GetDataSource(1); bdl.DataBind(); }
public void DataSource_WithDataSourceID () { Test2DataSource ds = new Test2DataSource (); ds.ID = "mono"; TestBaseDataList bdl = new TestBaseDataList (); Page p = new Page (); bdl.Page = p; ds.Page = p; p.Controls.Add (ds); p.Controls.Add (bdl); bdl.DataSourceID = "mono"; Assert.IsNotNull (bdl.Data (), "GetData"); bdl.DataSource = GetDataSource (1); bdl.DataBind (); }
public void DataSourceID () { TestBaseDataList bdl = new TestBaseDataList (); Assert.IsFalse (bdl.IsDataBoundByDataSourceId, "IsBoundUsingDataSourceID-1"); bdl.DataSourceID = "mono"; Assert.IsTrue (bdl.IsDataBoundByDataSourceId, "IsBoundUsingDataSourceID-2"); bdl.DataBind (); Assert.IsTrue (bdl.IsDataBoundByDataSourceId, "IsBoundUsingDataSourceID-3"); }
public void OnDataBinding () { // does DataBind calls base.OnDataBinding (like most sample do) // or does it call the overriden OnDataBinding (which seems logical) TestBaseDataList bdl = new TestBaseDataList (); Assert.IsFalse (bdl.DataBindingCalled, "Before DataBind"); bdl.DataSource = GetDataSource (3); bdl.DataBind (); Assert.IsTrue (bdl.DataBindingCalled, "After DataBind"); }
public void Render () { TestBaseDataList bdl = new TestBaseDataList (); bdl.DataSource = GetDataSource (3); bdl.DataBind (); Assert.AreEqual (String.Empty, bdl.Render ()); }