예제 #1
0
        public void RunPipes(UnitTreeNode node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            // explicit test run
            this.FixtureRunner.IsExplicit = true;

            // get test tree node
            TestTreeNode testNode = this.guidNodes[node.TestIdentifier];

            // clear select dictionaries
            this.selectedPipes.Clear();
            this.selectedFixtures.Clear();

            // create the list of pipes to run
            this.GetSelectedNodes(testNode);

            // run pipes
            this.RunPipes();

            // clear nodes
            this.selectedPipes.Clear();
            this.selectedFixtures.Clear();
        }
예제 #2
0
        public void Ignore(Guid pipeIdentifier)
        {
            int imageIndex = ReflectionImageList.ImageIndex(TestNodeType.Test, TestState.Ignored);

            IEnumerable nodes = this.pipeNodes[pipeIdentifier] as IEnumerable;

            if (nodes == null)
            {
                throw new InvalidOperationException("pipe not found");
            }
            foreach (UnitTreeNode node in nodes)
            {
                node.TestState = TestState.Ignored;

                UnitTreeNode parent = node.Parent as UnitTreeNode;
                while (parent != null)
                {
                    if (parent.TestState != TestState.Failure)
                    {
                        parent.TestState = TestState.Ignored;
                    }
                    else
                    {
                        break;
                    }
                    parent = parent.Parent as UnitTreeNode;
                }
            }
        }
예제 #3
0
		public TreeNodeState(UnitTreeNode node)
		{
			this.fullPath=node.FullPath;
			this.isExpanded=node.IsExpanded;
			this.isVisible=node.IsVisible;
            this.isSelected = node.IsSelected;
		}
        public virtual void VisitNode(UnitTreeNode node)
        {
            if (node==null)
                return;

            this.VisitNodes(node.Nodes);
        }
예제 #5
0
        public virtual void VisitNode(UnitTreeNode node)
        {
            if (node == null)
            {
                return;
            }

            this.VisitNodes(node.Nodes);
        }
예제 #6
0
        public ReportRun GetResult(UnitTreeNode node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            TreeTestDomain domain = this.GetDomain(node.DomainIdentifier);

            return(domain.TestTree.GetResult(node.TestIdentifier));
        }
예제 #7
0
 public void PopulateChildTree(TreeView tree, TestTreeNodeFacade facade)
 {
     foreach (TreeTestDomain td in this.list)
     {
         UnitTreeNode node = this.factory.CreateUnitTreeNode(
             td.TestTree.ParentNode.Name,
             TestNodeType.Populator,
             td.Identifier,
             td.TestTree.ParentNode.Identifier
             );
         tree.Invoke(new AddNodeDelegate(tree.Nodes.Add), new Object[] { node });
         td.PopulateChildTree(node, facade);
     }
 }
예제 #8
0
		public override void VisitNode(UnitTreeNode node)
		{
			if (this.loading)
			{
				TreeNodeState old = this.states[node.FullPath] as TreeNodeState;
				if (old!=null)
				{
					this.tree.Invoke(this.updateNode,new Object[]{old,node});
				}
			}
			else
			{
				if (node.IsExpanded || node.IsVisible || node.IsSelected)
					this.states[node.FullPath]=new TreeNodeState(node);
			}
			base.VisitNode(node);
		}
예제 #9
0
        public void RunPipes(UnitTreeNode node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            try
            {
                this.Watcher.Stop();
                TreeTestDomain domain = GetDomain(node.DomainIdentifier);
                domain.TestTree.RunPipes(node);
            }
            finally
            {
                this.Watcher.Start();
            }
        }
예제 #10
0
 public override void VisitNode(UnitTreeNode node)
 {
     if (this.loading)
     {
         TreeNodeState old = this.states[node.FullPath] as TreeNodeState;
         if (old != null)
         {
             this.tree.Invoke(this.updateNode, new Object[] { old, node });
         }
     }
     else
     {
         if (node.IsExpanded || node.IsVisible || node.IsSelected)
         {
             this.states[node.FullPath] = new TreeNodeState(node);
         }
     }
     base.VisitNode(node);
 }
예제 #11
0
        protected void CreateTree(UnitTreeNode node, TestTreeNodeFacade facade, TestTreeNode testNode)
        {
            if (testNode.IsTest)
            {
                facade.AddNode(testNode.PipeIdentifier, node);
            }

            foreach (TestTreeNode childNode in testNode.Nodes)
            {
                UnitTreeNode cnode = this.factory.CreateUnitTreeNode(
                    childNode.Name,
                    childNode.NodeType,
                    this.Identifier,
                    childNode.Identifier
                    );
                this.factory.AddChildUnitTreeNode(node, cnode);
                this.CreateTree(cnode, facade, childNode);
            }
        }
예제 #12
0
        protected void CreateTree(UnitTreeNode node, TestTreeNodeFacade facade, TestTreeNode testNode)
        {
            if (testNode.IsTest)
            {
                facade.AddNode(testNode.PipeIdentifier, node);
            }

            foreach (TestTreeNode childNode in testNode.Nodes)
            {
                UnitTreeNode cnode = this.factory.CreateUnitTreeNode(
                    childNode.Name,
                    childNode.NodeType,
                    this.Identifier,
                    childNode.Identifier
                    );
                this.factory.AddChildUnitTreeNode(node, cnode);
                this.CreateTree(cnode, facade, childNode);
            }
        }
예제 #13
0
        public void Failure(Guid pipeIdentifier)
        {
            IEnumerable nodes = this.pipeNodes[pipeIdentifier] as IEnumerable;

            if (nodes == null)
            {
                throw new InvalidOperationException("pipe not found");
            }
            foreach (UnitTreeNode node in nodes)
            {
                node.TestState = TestState.Failure;

                UnitTreeNode parent = node.Parent as UnitTreeNode;
                while (parent != null)
                {
                    parent.TestState = TestState.Failure;
                    parent           = parent.Parent as UnitTreeNode;
                }
            }
        }
예제 #14
0
 public void PopulateChildTree(UnitTreeNode root, TestTreeNodeFacade facade)
 {
     CreateTree(root, facade, this.TestTree.ParentNode);
 }
        public void RunPipes(UnitTreeNode node)
        {
            if (node==null)
                throw new ArgumentNullException("node");

            try
            {
                this.Watcher.Stop();
                TreeTestDomain domain = GetDomain(node.DomainIdentifier);
                domain.TestTree.RunPipes(node);
            }
            finally
            {
                this.Watcher.Start();
            }
        }
        public ReportRun GetResult(UnitTreeNode node)
        {
            if (node == null)
                throw new ArgumentNullException("node");

            TreeTestDomain domain = this.GetDomain(node.DomainIdentifier);
            return domain.TestTree.GetResult(node.TestIdentifier);
        }
 private void clearNodeResults(UnitTreeNode node)
 {
     if (node==null)
         return;
     node.TestState = TestState.NotRun;
     foreach(UnitTreeNode child in node.Nodes)
         this.clearNodeResults(child);
 }
 public void UpdateNode(TreeNodeState old, UnitTreeNode node)
 {
     if (old.IsVisible)
         node.EnsureVisible();
     if (old.IsExpanded)
         node.Expand();
 }
 public void ExpandState(UnitTreeNode node, TestState state)
 {
     if (node==null)
         return;
     if (node.TestState==state)
         node.EnsureVisible();
     foreach(UnitTreeNode child in node.Nodes)
         ExpandState(child,state);
 }
 public void ClearResults(UnitTreeNode node)
 {
     if (node==null)
         return;
     this.clearNodeResults(node);
 }
예제 #21
0
		public void UpdateNode(TreeNodeState old, UnitTreeNode node)
		{
			if (old.IsVisible)
				node.EnsureVisible();
			if (old.IsExpanded)
				node.Expand();
            if (old.IsSelected)
                this.typeTree.SelectedNode = node;
		}
예제 #22
0
 public void PopulateChildTree(UnitTreeNode root, TestTreeNodeFacade facade)
 {
     CreateTree(root, facade, this.TestTree.ParentNode);
 }
예제 #23
0
        public void RunPipes(UnitTreeNode node)
        {
            if (node==null)
                throw new ArgumentNullException("node");

            // get test tree node
            TestTreeNode testNode = this.guidNodes[node.TestIdentifier];

            // clear select dictionaries
            this.selectedPipes.Clear();
            this.selectedFixtures.Clear();

            // create the list of pipes to run
            this.GetSelectedNodes(testNode);

            // run pipes
            this.RunPipes();

            // clear nodes
            this.selectedPipes.Clear();
            this.selectedFixtures.Clear();
        }