/// <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);
 }
Esempio n. 2
0
            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]);
        }
Esempio n. 4
0
        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;
 }
Esempio n. 7
0
        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);
        }
Esempio n. 8
0
        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);
        }
Esempio n. 9
0
        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);
        }
Esempio n. 10
0
		/// <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);
		}
Esempio n. 11
0
		/// <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);
		}
Esempio n. 12
0
 protected virtual bool FilterRunPipe(RunPipeStarter starter)
 {
     return this.RunPipeFilter.Filter(starter.Pipe);
 }
Esempio n. 13
0
 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;
        }
Esempio n. 15
0
 public void DetachFromPipe(RunPipeStarter starter)
 {
     starter.Listeners.Remove(this);
 }
Esempio n. 16
0
 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);
            }
Esempio n. 18
0
		/// <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);
		}
 public void AttachToPipe(RunPipeStarter starter)
 {
     starter.Listeners.Add(this);
 }
 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];
 }
 public void DetachFromPipe(RunPipeStarter starter)
 {
     starter.Listeners.Remove(this);
 }
Esempio n. 22
0
 /// <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;
		}	
Esempio n. 24
0
 /// <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);
 }