public void CanShowAndClose_DockManagerWorkspace() { // the DockManager must be passed a ContainerControl or the Workspace won't handle it // perhaps we should add something to the workspace to guard this.... var dockManagerWorkspace = new DockManagerWorkspace(new DockManager(new ContainerControl())); dockManagerWorkspace.Show(_smartPart); dockManagerWorkspace.DockPanels.Count.ShouldEqual(1); dockManagerWorkspace.Close(_smartPart); dockManagerWorkspace.DockPanels.Count.ShouldEqual(0); }
public void CanShow_DockManagerWorkspace_If_PanelName_Is_NotNull() { var dockManager = new DockManager(new ContainerControl()); var dockManagerWorkspace = new DockManagerWorkspace(dockManager); var smartPartInfo = new DockManagerSmartPartInfo { ParentPanelName = "PanelBob", Name = "Bob", Dock = DockingStyle.Bottom }; dockManagerWorkspace.Show(_smartPart, smartPartInfo); dockManagerWorkspace.DockPanels.Count.ShouldEqual(1); dockManager.Panels[0].Name.ShouldEqual("Bob"); dockManager.Panels[0].Dock.ShouldEqual(DockingStyle.Bottom); dockManagerWorkspace.Close(_smartPart); dockManagerWorkspace.DockPanels.Count.ShouldEqual(0); }