Example #1
0
        public void DetailsView_EnsureChildControlsFlow()
        {
            MyCompositeDataBoundControl c = new MyCompositeDataBoundControl();

            Assert.IsFalse(c.GetRequiresDataBinding());
            c.DoEnsureChildControls();
            Assert.IsTrue(c.ensureCreateChildControls);
            Assert.IsFalse(c.ensureDataBound);
            Assert.IsFalse(c.dataBind);
            Assert.IsTrue(c.createChildControls1);
            Assert.IsFalse(c.createChildControls2);
        }
		public void DetailsView_EnsureChildControlsFlow2 () {
			MyCompositeDataBoundControl c = new MyCompositeDataBoundControl ();
			c.SetRequiresDataBinding (true);
			Assert.IsTrue (c.GetRequiresDataBinding ());
			c.DoEnsureChildControls ();
			Assert.IsTrue (c.ensureCreateChildControls);
			Assert.IsTrue (c.ensureDataBound);
			Assert.IsFalse (c.dataBind);
			Assert.IsTrue (c.createChildControls1);
			Assert.IsFalse (c.createChildControls2);
		}