public void EventsTest() { SolutionTreeNodeTest _model = new SolutionTreeNodeTest(); SolutionTreeNodeControlTest _instance = new SolutionTreeNodeControlTest(_model); Assert.AreEqual <int>(1, _model.SubtreeChangedCount); Assert.AreEqual <int>(1, _model.TextChangedCount); }
public void BeforeMenuStripOpeningTest() { SolutionTreeNodeControlTest _instance = new SolutionTreeNodeControlTest(new SolutionTreeNodeTest()); Assert.AreEqual <int>(0, _instance.ContextMenuStrip.Items.Count); _instance.RunBeforeMenuStripOpening(); Assert.AreEqual <int>(9, _instance.ContextMenuStrip.Items.Count); Assert.AreEqual <string>("GetPluginMenuItems", _instance.ContextMenuStrip.Items[8].Text); }
public void ConstructorTest() { SolutionTreeNodeControlTest _instance = new SolutionTreeNodeControlTest(new SolutionTreeNodeTest()); Assert.AreEqual <int>(0, _instance.ContextMenuStrip.Items.Count); Assert.AreEqual <string>(nameof(SolutionTreeNodeTest), _instance.Name); Assert.AreEqual <string>("ToolTipText", _instance.ToolTipText); Assert.AreEqual <int>(0, _instance.Nodes.Count); }
public void AddProjectTest() { SolutionTreeNodeTest _model = new SolutionTreeNodeTest(); SolutionTreeNodeControlTest _instance = new SolutionTreeNodeControlTest(_model); Assert.AreEqual <int>(0, _instance.Nodes.Count); _model.AddProject(false); Assert.AreEqual <int>(1, _instance.Nodes.Count); Assert.IsInstanceOfType(_instance.Nodes[0], typeof(DictionaryTreeNodeTest)); }
public void Constructor4TreeTest() { SolutionTreeNodeTest _model = new SolutionTreeNodeTest { new BaseModelTest() }; SolutionTreeNodeControlTest _instance = new SolutionTreeNodeControlTest(_model); Assert.AreEqual <int>(1, _instance.Nodes.Count); }