/// <summary> /// When Collapse context menu item is clicked, collapse the node /// </summary> private void collapseMenuItem_Click(object sender, System.EventArgs e) { TestSuiteTreeNode targetNode = contextNode != null ? contextNode : (TestSuiteTreeNode)SelectedNode; if (targetNode != null) { targetNode.Collapse(); } }
/// <summary> /// Helper collapses all fixtures under a node /// </summary> /// <param name="node">Node under which to collapse fixtures</param> private void CollapseFixturesUnderNode(TestSuiteTreeNode node) { if (node.Test.IsFixture) { node.Collapse(); } else { foreach (TestSuiteTreeNode child in node.Nodes) { CollapseFixturesUnderNode(child); } } }
/// <summary> /// Helper collapses all fixtures under a node /// </summary> /// <param name="node">Node under which to collapse fixtures</param> private void HideTestsUnderNode(TestSuiteTreeNode node) { if (node.Test.IsSuite) { if (node.Test.TestType == "TestFixture") { node.Collapse(); } else { node.Expand(); foreach (TestSuiteTreeNode child in node.Nodes) { HideTestsUnderNode(child); } } } }
/// <summary> /// Helper collapses all fixtures under a node /// </summary> /// <param name="node">Node under which to collapse fixtures</param> private void HideTestsUnderNode(TestSuiteTreeNode node) { bool expand = false; foreach (TestSuiteTreeNode child in node.Nodes) { if (child.Test.IsSuite) { expand = true; HideTestsUnderNode(child); } } if (expand) { node.Expand(); } else { node.Collapse(); } }
/// <summary> /// Helper collapses all fixtures under a node /// </summary> /// <param name="node">Node under which to collapse fixtures</param> private void HideTestsUnderNode( TestSuiteTreeNode node ) { bool expand = false; foreach( TestSuiteTreeNode child in node.Nodes ) if ( child.Test.IsSuite ) { expand = true; HideTestsUnderNode( child ); } if ( expand ) node.Expand(); else node.Collapse(); }
/// <summary> /// When Collapse context menu item is clicked, collapse the node /// </summary> private void collapseMenuItem_Click(object sender, System.EventArgs e) { contextNode.Collapse(); }
/// <summary> /// Helper collapses all fixtures under a node /// </summary> /// <param name="node">Node under which to collapse fixtures</param> private void HideTestsUnderNode( TestSuiteTreeNode node ) { if (node.Test.IsSuite) { if (node.Test.TestType == "TestFixture") node.Collapse(); else { node.Expand(); foreach (TestSuiteTreeNode child in node.Nodes) HideTestsUnderNode(child); } } }