public void DealsWithNoninheritableControlCollections()
        {
            Control rootControl = GetRootControl();

            Control ctl = new ControlWithNoninheritableCollectionType();

            rootControl.Controls.Add(ctl);

            MockControl subControl = new MockControl();

            ctl.Controls.Add(subControl);
            Assert.IsTrue(subControl.GotIt);

            MockControl subControl2 = new MockControl();

            ctl.Controls.AddAt(0, subControl2);
            Assert.IsTrue(subControl2.GotIt);
        }
        public void DealsWithNoninheritableControlCollections()
        {
            Control rootControl = GetRootControl();

            Control ctl = new ControlWithNoninheritableCollectionType();
            rootControl.Controls.Add(ctl);

            MockControl subControl = new MockControl();
            ctl.Controls.Add(subControl);
            Assert.IsTrue(subControl.GotIt);

            MockControl subControl2 = new MockControl();
            ctl.Controls.AddAt(0, subControl2);
            Assert.IsTrue(subControl2.GotIt);
        }