public void Test_Construct_ShouldSetMainTitleIconControl() { //---------------Set up test pack------------------- //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- IMainEditorPanel mainEditorPanel = CreateControl(GetControlFactory()); //---------------Test Result ----------------------- Assert.IsNotNull(mainEditorPanel.MainTitleIconControl); Assert.IsNotNull(mainEditorPanel.EditorPanel); Assert.AreEqual(2, mainEditorPanel.Controls.Count); Assert.IsTrue(mainEditorPanel.Controls.Contains(mainEditorPanel.MainTitleIconControl)); Assert.IsTrue(mainEditorPanel.Controls.Contains(mainEditorPanel.EditorPanel)); }
public void Test_Construct_ShouldDocTitleIconAndEditorPanel() { //---------------Set up test pack------------------- //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- IMainEditorPanel mainEditorPanel = CreateControl(GetControlFactory()); mainEditorPanel.Size = new Size(432, 567); //---------------Test Result ----------------------- Assert.AreEqual(mainEditorPanel.Width, mainEditorPanel.MainTitleIconControl.Width); Assert.AreEqual(mainEditorPanel.Width, mainEditorPanel.EditorPanel.Width); Assert.AreEqual (mainEditorPanel.Height - mainEditorPanel.MainTitleIconControl.Height, mainEditorPanel.EditorPanel.Height); }
protected override void AssertControlDockedInForm(IControlHabanero control, IControlHabanero form) { Assert.AreEqual(1, form.Controls.Count, "No container control found in form"); IControlHabanero splitCntrl = form.Controls[0]; Assert.IsInstanceOf(typeof(ISplitContainer), splitCntrl); Gizmox.WebGUI.Forms.SplitContainer splitContainerVWG = (Gizmox.WebGUI.Forms.SplitContainer)splitCntrl; Gizmox.WebGUI.Forms.SplitterPanel panel2 = splitContainerVWG.Panel2; Assert.AreEqual(1, panel2.Controls.Count); IControlHabanero editorControl = (IControlHabanero)panel2.Controls[0]; Assert.IsInstanceOf(typeof(IMainEditorPanel), editorControl); IMainEditorPanel mainEditorPanel = (IMainEditorPanel)editorControl; IControlHabanero contentControl = mainEditorPanel.EditorPanel; Assert.AreEqual(1, contentControl.Controls.Count); Assert.AreSame(control, contentControl.Controls[0]); Assert.AreEqual(Habanero.Faces.Base.DockStyle.Fill, control.Dock); }