/// <summary> /// Adds an instance of type RunPipeStarter to the end of this RunPipeStarterCollection. /// </summary> /// <param name="value"> /// The RunPipeStarter to be added to the end of this RunPipeStarterCollection. /// </param> public void Add(RunPipeStarter value) { if (value == null) { throw new ArgumentNullException("value"); } this.List.Add(value); }
protected override bool FilterRunPipe(RunPipeStarter starter) { if (!base.FilterRunPipe(starter)) { return(false); } if (this.Tree.selectedPipes.Count == 0) { return(true); } return(this.Tree.selectedPipes.Contains(starter)); }
private TestTreeNode addFixtureNode( GuidTestTreeNodeDictionary nodes, TestTreeNode parentNode, RunPipeStarter pipeStarter) { RunPipe pipe = pipeStarter.Pipe; if (!this.fixtureNodes.Contains(pipe.FixtureName)) { TestTreeNode fixtureNode = new TestTreeNode(pipe.FixtureName, TestNodeType.Fixture); this.fixtureNodes.Add(pipe.FixtureName, fixtureNode); nodes.Add(fixtureNode); parentNode.Nodes.Add(fixtureNode); } return((TestTreeNode)this.fixtureNodes[pipe.FixtureName]); }
private TestTreeNode addFixtureNode(GuidTestTreeNodeDictionary nodes, TestTreeNode parentNode, RunPipeStarter pipeStarter) { RunPipe pipe = pipeStarter.Pipe; string key = pipe.FixtureName + parentNode.FullPath; if (!this.fixtureNodes.Contains(key)) { TestTreeNode fixtureNode = new TestTreeNode(pipe.FixtureName, TestNodeType.Fixture); this.fixtureNodes.Add(key, fixtureNode); nodes.Add(fixtureNode); parentNode.Nodes.Add(fixtureNode); } return((TestTreeNode)this.fixtureNodes[key]); }
private TestTreeNode addFixtureNode(GuidTestTreeNodeDictionary nodes, TestTreeNode parentNode, RunPipeStarter pipeStarter) { RunPipe pipe = pipeStarter.Pipe; TestTreeNode fixtureNode = this.fixtureNodes[pipe.Fixture.Type] as TestTreeNode; if (fixtureNode != null) return fixtureNode; fixtureNode = new TestTreeNode(pipe.FixtureName,TestNodeType.Fixture); this.fixtureNodes.Add(pipe.Fixture.Type,fixtureNode); nodes.Add(fixtureNode); parentNode.Nodes.Add(fixtureNode); return fixtureNode; }
public static TestTreeNode CreatePipeNode( GuidTestTreeNodeDictionary nodes, TestTreeNode parentNode, RunPipeStarter starter) { TestTreeNode pipeNode = new TestTreeNode(starter.Pipe.ShortName,TestNodeType.Test); pipeNode.Starter = starter; pipeNode.State = TestState.NotRun; nodes.Add(pipeNode); parentNode.Nodes.Add(pipeNode); /* foreach (RunInvokerVertex v in starter.Pipe.Invokers) { TestTreeNode invokerNode = new TestTreeNode(v.Invoker.Name,TestNodeType.Invoker); pipeNode.Nodes.Add(invokerNode); } */ return pipeNode; }
private TestTreeNode addFixtureNode(GuidTestTreeNodeDictionary nodes, TestTreeNode parentNode, RunPipeStarter pipeStarter) { RunPipe pipe = pipeStarter.Pipe; TestTreeNode fixtureNode = this.fixtureNodes[pipe.Fixture.Type] as TestTreeNode; if (fixtureNode != null) { return(fixtureNode); } fixtureNode = new TestTreeNode(pipe.FixtureName, TestNodeType.Fixture); this.fixtureNodes.Add(pipe.Fixture.Type, fixtureNode); nodes.Add(fixtureNode); parentNode.Nodes.Add(fixtureNode); return(fixtureNode); }
public static TestTreeNode CreatePipeNode( GuidTestTreeNodeDictionary nodes, TestTreeNode parentNode, RunPipeStarter starter) { TestTreeNode pipeNode = new TestTreeNode(starter.Pipe.ShortName, TestNodeType.Test); pipeNode.Starter = starter; pipeNode.State = TestState.NotRun; nodes.Add(pipeNode); parentNode.Nodes.Add(pipeNode); /* * foreach (RunInvokerVertex v in starter.Pipe.Invokers) * { * TestTreeNode invokerNode = new TestTreeNode(v.Invoker.Name,TestNodeType.Invoker); * pipeNode.Nodes.Add(invokerNode); * } */ return(pipeNode); }
private TestTreeNode addNamespaceNodes(GuidTestTreeNodeDictionary nodes, RunPipeStarter pipeStarter) { RunPipe pipe = pipeStarter.Pipe; string ns = ""; TestTreeNode parent = this.parentNode; string namespace_ = pipe.FixtureType.Namespace; if (namespace_ == null || namespace_.Length == 0) { namespace_ = ""; } foreach (string name in namespace_.Split('.')) { if (ns.Length == 0) { ns += name; } else { ns += "." + name; } if (!this.namespaceNodes.Contains(ns)) { TestTreeNode node = new TestTreeNode(name, TestNodeType.Category); this.namespaceNodes.Add(ns, node); parent.Nodes.Add(node); nodes.Add(node); parent = node; } else { parent = (TestTreeNode)this.namespaceNodes[ns]; } } return(parent); }
/// <summary> /// Adds an instance of type RunPipeStarter to the end of this RunPipeStarterCollection. /// </summary> /// <param name="value"> /// The RunPipeStarter to be added to the end of this RunPipeStarterCollection. /// </param> public void Add(RunPipeStarter value) { if (value == null) throw new ArgumentNullException("value"); this.List.Add(value); }
/// <summary> /// Removes the first occurrence of a specific RunPipeStarter from this RunPipeStarterCollection. /// </summary> /// <param name="value"> /// The RunPipeStarter value to remove from this RunPipeStarterCollection. /// </param> public void Remove(RunPipeStarter value) { this.List.Remove(value); }
protected virtual bool FilterRunPipe(RunPipeStarter starter) { return this.RunPipeFilter.Filter(starter.Pipe); }
protected virtual bool FilterRunPipe(RunPipeStarter starter) { return(this.RunPipeFilter.Filter(starter.Pipe)); }
private ReportRunResult InternalRunFixture(Fixture fixture) { if (fixture == null) throw new ArgumentNullException("fixture"); Object fixtureInstance = null; ReportRunResult result = ReportRunResult.Success; try { fixtureInstance = CreateFixtureInstance(fixture); if (fixtureInstance == null) return ReportRunResult.Failure; // aborting if requested if (this.IsAbortPending) return ReportRunResult.Failure; fixtureInstance = RunFixtureSetUp(fixture, fixtureInstance); if (fixtureInstance == null) return ReportRunResult.Failure; // aborting if requested if (this.IsAbortPending) return ReportRunResult.Failure; this.CurrentPipeStarter = null; foreach (RunPipeStarter starter in fixture.Starters) { if (!this.FilterRunPipe(starter)) continue; // aborting if requested if (this.IsAbortPending) return ReportRunResult.Failure; this.CurrentPipeStarter = starter; starter.Run(fixtureInstance); OnRunResult(new ReportRunEventArgs(starter.Result)); if (starter.Result.Result != ReportRunResult.Success && result != ReportRunResult.Failure) result = starter.Result.Result; } } finally { this.CurrentPipeStarter = null; if (fixtureInstance != null) { RunFixtureTearDown(fixture, fixtureInstance); } } return result; }
public void DetachFromPipe(RunPipeStarter starter) { starter.Listeners.Remove(this); }
public void AttachToPipe(RunPipeStarter starter) { starter.Listeners.Add(this); }
protected override bool FilterRunPipe(RunPipeStarter starter) { if (!base.FilterRunPipe(starter)) return false; if (this.Tree.selectedPipes.Count == 0) return true; return this.Tree.selectedPipes.Contains(starter); }
/// <summary> /// Determines whether a specfic RunPipeStarter value is in this RunPipeStarterCollection. /// </summary> /// <param name="value"> /// The RunPipeStarter value to locate in this RunPipeStarterCollection. /// </param> /// <returns> /// true if value is found in this RunPipeStarterCollection; /// false otherwise. /// </returns> public bool Contains(RunPipeStarter value) { return this.List.Contains(value); }
private TestTreeNode addFixtureNode(GuidTestTreeNodeDictionary nodes, TestTreeNode parentNode, RunPipeStarter pipeStarter) { RunPipe pipe = pipeStarter.Pipe; string key=pipe.FixtureName+parentNode.Name; if (!this.fixtureNodes.Contains(key)) { TestTreeNode fixtureNode = new TestTreeNode(pipe.FixtureName,TestNodeType.Fixture); this.fixtureNodes.Add(key,fixtureNode); nodes.Add(fixtureNode); parentNode.Nodes.Add(fixtureNode); } return (TestTreeNode)this.fixtureNodes[key]; }
/// <summary> /// Determines whether a specfic RunPipeStarter value is in this RunPipeStarterCollection. /// </summary> /// <param name="value"> /// The RunPipeStarter value to locate in this RunPipeStarterCollection. /// </param> /// <returns> /// true if value is found in this RunPipeStarterCollection; /// false otherwise. /// </returns> public bool Contains(RunPipeStarter value) { return(this.List.Contains(value)); }
private TestTreeNode addNamespaceNodes(GuidTestTreeNodeDictionary nodes, RunPipeStarter pipeStarter) { RunPipe pipe = pipeStarter.Pipe; string ns = ""; TestTreeNode parent = this.parentNode; string namespace_ = pipe.FixtureType.Namespace; if (namespace_==null ||namespace_.Length==0) namespace_=""; foreach(string name in namespace_.Split('.')) { if (ns.Length==0) ns+=name; else ns+="."+name; if (!this.namespaceNodes.Contains(ns)) { TestTreeNode node = new TestTreeNode(name,TestNodeType.Category); this.namespaceNodes.Add(ns,node); parent.Nodes.Add(node); nodes.Add(node); parent = node; } else parent = (TestTreeNode)this.namespaceNodes[ns]; } return parent; }