Exemplo n.º 1
0
        public void TestCollapsiblePanelHosterOtherTests()
        {
            // Ensure ENoTaskListNodeSpecifiedException is thrown if no TaskListNode got specified
            FPnl = new TPnlCollapsible(THostedControlKind.hckCollapsiblePanelHoster);

            try
            {
                FPnl.RealiseCollapsiblePanelHoster();
            }
            catch (Exception e)
            {
                Assert.AreEqual(typeof(ENoTaskListNodeSpecifiedException), e.GetType());
            }

            // To ensure Unit Test code coverage only - nothing to assert here...
            FPnl = new TPnlCollapsible(THostedControlKind.hckCollapsiblePanelHoster,
                TTestTaskList.GetTestXmlNode(), TCollapseDirection.cdHorizontalRight);
            FPnl.VisualStyleEnum = TVisualStylesEnum.vsHorizontalCollapse;

            FPnl.RealiseCollapsiblePanelHoster();

            // To ensure Unit Test code coverage only - nothing to assert here...
            FPnl.Expand();
        }
Exemplo n.º 2
0
        public void TestSetter_CollapsiblePanelHosterInstance()
        {
            FPnl = new TPnlCollapsible(THostedControlKind.hckCollapsiblePanelHoster, TTestTaskList.GetTestXmlNode());
            FPnl.RealiseCollapsiblePanelHoster();

            TPnlCollapsibleHoster CpH1 = FPnl.CollapsiblePanelHosterInstance;

            TPnlCollapsibleHoster CpH2 = new TPnlCollapsibleHoster(TTestTaskList.GetTestXmlNode2(), TVisualStylesEnum.vsTaskPanel);

            FPnl.CollapsiblePanelHosterInstance = CpH2;

            Assert.AreNotEqual(CpH1, FPnl.CollapsiblePanelHosterInstance);

            assertIsStable2(FPnl);
        }