public void GetToolSupportedTest() { Panel panel = (Panel)((IContainer)_helper.IDesignerHost).Components[0]; // the root control DocumentDesignerTest designer = _helper.IDesignerHost.GetDesigner(panel) as DocumentDesignerTest; Assert.IsTrue(designer.GetToolSupported(new ToolboxItem(typeof(Form))), "#1"); }
public void InitializeTest() { Panel panel = (Panel)((IContainer)_helper.IDesignerHost).Components[0]; // the root control DocumentDesignerTest designer = _helper.IDesignerHost.GetDesigner(panel) as DocumentDesignerTest; SelectionRules rules = SelectionRules.BottomSizeable | SelectionRules.RightSizeable | SelectionRules.Visible; Assert.AreEqual(rules, designer.SelectionRules, "#1"); Assert.AreEqual(new Point(0, 0), (Point)_helper.GetValue(panel, "Location"), "#2"); #if NET_2_0 Assert.AreEqual(ViewTechnology.Default, ((IRootDesigner)designer).SupportedTechnologies[0], "#3"); Assert.IsTrue(((IRootDesigner)designer).GetView(ViewTechnology.Default) is Control, "#4"); #else Assert.AreEqual(ViewTechnology.WindowsForms, ((IRootDesigner)designer).SupportedTechnologies[0], "#3"); Assert.IsTrue(((IRootDesigner)designer).GetView(ViewTechnology.WindowsForms) is Control, "#4"); #endif }