예제 #1
0
        public void EnsureDataBound_WithoutDataSourceID()
        {
            TestBaseDataList bdl = new TestBaseDataList();

            Assert.IsFalse(bdl.DataBindingCalled, "Before EnsureDataBound");
            bdl.Ensure();
            Assert.IsFalse(bdl.DataBindingCalled, "After EnsureDataBound");
        }
예제 #2
0
        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");
        }
예제 #3
0
		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");
		}
예제 #4
0
		public void EnsureDataBound_WithoutDataSourceID ()
		{
			TestBaseDataList bdl = new TestBaseDataList ();
			Assert.IsFalse (bdl.DataBindingCalled, "Before EnsureDataBound");
			bdl.Ensure ();
			Assert.IsFalse (bdl.DataBindingCalled, "After EnsureDataBound");
		}