Exemplo n.º 1
0
        public void Render()
        {
            TestBaseDataList bdl = new TestBaseDataList();

            bdl.DataSource = GetDataSource(3);
            bdl.DataBind();
            Assert.AreEqual(String.Empty, bdl.Render());
        }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
		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 ();
		}
Exemplo n.º 6
0
		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");
		}
Exemplo n.º 7
0
		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");
		}
Exemplo n.º 8
0
		public void Render ()
		{
			TestBaseDataList bdl = new TestBaseDataList ();
			bdl.DataSource = GetDataSource (3);
			bdl.DataBind ();
			Assert.AreEqual (String.Empty, bdl.Render ());
		}