Exemple #1
0
        public virtual void Test_TestAddControl()
        {
            //---------------Set up test pack-------------------
            IGroupBoxGroupControl groupBox = GetControlFactory().CreateGroupBoxGroupControl();
            IPanel contentControl          = GetControlFactory().CreatePanel();

            //---------------Assert Precondition----------------
            Assert.AreEqual(0, groupBox.Controls.Count);
            //---------------Execute Test ----------------------
            const int        minHeight           = 110;
            const int        minimumControlWidth = 150;
            IControlHabanero control             = groupBox.AddControl(contentControl, "this", minHeight, minimumControlWidth);

            //---------------Test Result -----------------------
            Assert.AreEqual(1, control.Controls.Count);
            Assert.AreEqual(minHeight + 30, control.Height);
            Assert.AreEqual(minimumControlWidth + 30, control.Width);
            Assert.AreSame(contentControl, control.Controls[0]);
            Assert.AreEqual(minHeight - 10, contentControl.Height);
//            Assert.AreEqual(minimumControlWidth, contentControl.Width);
            Assert.AreEqual(1, groupBox.Controls.Count);
        }
 /// <summary>
 /// Constructs the <see cref="CollapsiblePanelGroupManager"/>
 /// </summary>
 // ReSharper disable SuggestBaseTypeForParameter
 public GroupBoxGroupControlManager(IGroupBoxGroupControl collapsiblePanelGroup, IControlFactory controlFactory)
 {
     this.CollapsiblePanelGroup = collapsiblePanelGroup;
     this.ControlFactory = controlFactory;
     this.LayoutManager = new ColumnLayoutManager(collapsiblePanelGroup, ControlFactory);
 }
Exemple #3
0
 /// <summary>
 /// Constructs the <see cref="CollapsiblePanelGroupManager"/>
 /// </summary>
 // ReSharper disable SuggestBaseTypeForParameter
 public GroupBoxGroupControlManager(IGroupBoxGroupControl collapsiblePanelGroup, IControlFactory controlFactory)
 {
     this.CollapsiblePanelGroup = collapsiblePanelGroup;
     this.ControlFactory        = controlFactory;
     this.LayoutManager         = new ColumnLayoutManager(collapsiblePanelGroup, ControlFactory);
 }