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(); }
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; } } }
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); }
public virtual void VisitNode(UnitTreeNode node) { if (node == null) { return; } this.VisitNodes(node.Nodes); }
public ReportRun GetResult(UnitTreeNode node) { if (node == null) { throw new ArgumentNullException("node"); } TreeTestDomain domain = this.GetDomain(node.DomainIdentifier); return(domain.TestTree.GetResult(node.TestIdentifier)); }
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); } }
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); }
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 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); }
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); } }
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; } } }
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); }
public void UpdateNode(TreeNodeState old, UnitTreeNode node) { if (old.IsVisible) node.EnsureVisible(); if (old.IsExpanded) node.Expand(); if (old.IsSelected) this.typeTree.SelectedNode = node; }
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(); }