Пример #1
0
 static DummyTreeNode()
 {
     DummyFile = ItemList.CreateNewFile(SystemPaths.Temporary.Bond("dummytreenode"), FileFormat.Unknown);
     Instance  = new DummyTreeNode();
 }
Пример #2
0
		private void SetTreeNodes(IList<ReportSuite> reportSuites)
		{
			foreach (ReportSuite suite in reportSuites)
			{
				ContainerNode suitenode = new ContainerNode(suite.Name);
				suitenode.Name = suite.Name;
				foreach (ReportAssembly reportAssembly in suite.Assemblies)
				{
					ContainerNode assemblyNode = new ContainerNode(reportAssembly.Location);
					assemblyNode.Name = reportAssembly.Location;
					foreach (TestClass testClass in reportAssembly.TestClasses)
					{
						ContainerNode testClassNode = new ContainerNode(testClass.Name);
						testClassNode.Name = testClass.TestNamespace;
						foreach (Test test in testClass.Tests)
						{
							bool testPassed = test.Passed;
							string testName = test.Name;
							TestCaseNode testNode = new TestCaseNode(testName);
							if (!testPassed)
							{
								FailStateNode dummy = new DummyTreeNode("-");
								testNode.Nodes.Add(dummy);
								testNode.NotifyChildAttached(dummy);
							}
							testClassNode.Nodes.Add(testNode);
							testClassNode.NotifyChildAttached(testNode);
						}
						assemblyNode.Nodes.Add(testClassNode);
						testClassNode.NotifyAttachedToParent();
					}
					suitenode.Nodes.Add(assemblyNode);
					assemblyNode.NotifyAttachedToParent();
				}
				reportTreeView.Nodes.Add(suitenode);
			}

		}