Exemplo n.º 1
0
        public void CanApplyWindowOptions()
        {
            TestableRootWorkItem workItem  = new TestableRootWorkItem();
            WindowWorkspace      workspace = workItem.Workspaces.AddNew <WindowWorkspace>();
            MockSmartPart        smartPart = workItem.SmartParts.AddNew <MockSmartPart>();

            WindowSmartPartInfo info = new WindowSmartPartInfo();

            info.Title = "Mock Smart Part";
            info.Width = 400;

            workspace.Show(smartPart, info);

            Assert.AreEqual(400, workspace.Windows[smartPart].Width);

            info.Width = 500;
            workspace.ApplySmartPartInfo(smartPart, info);

            Assert.AreEqual(500, workspace.Windows[smartPart].Width);
        }