Example #1
0
 public static string GetTreeCode(List<NunitGoTest> tests)
 {
     var strWr = new StringWriter();
     using (var writer = new HtmlTextWriter(strWr))
     {
         writer
             .Id("tests-tree")
             .Div(() => writer
                 .BuildTreeFromSuites(new List<NunitGoSuite>
                 {
                     tests.GetSuite("All tests")
                 })
             );
     }
     return strWr.ToString();
 }
Example #2
0
        public Tree(List<NunitGoTest> tests)
		{
			_idSuiteCounter = 0;
			Style = GetStyle();

			var strWr = new StringWriter();
			using (var writer = new HtmlTextWriter(strWr))
			{
				writer.AddAttribute(HtmlTextWriterAttribute.Id, Id);
				writer.RenderBeginTag(HtmlTextWriterTag.Div);
                BuildTreeFromSuites(writer, new List<NunitGoSuite> {tests.GetSuite("All tests")});
                writer.RenderEndTag(); //DIV
			}

			HtmlCode = strWr.ToString();
		}