예제 #1
0
        /// <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();
            }
        }
예제 #2
0
 /// <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);
         }
     }
 }
예제 #3
0
        /// <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);
                    }
                }
            }
        }
예제 #4
0
        /// <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();
            }
        }
예제 #5
0
        /// <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();
        }
예제 #6
0
 /// <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);
                }
            }
		}