Example #1
0
 private void CreateReportHeadingHtml(StreamWriter sw, Report report, string suiteName)
 {
     sw.Write(_htmlSupport.GetTagStart("table"));
     if (!string.IsNullOrWhiteSpace(suiteName))
     {
         WriteHtmlRow(sw, "Test Suite:", suiteName);
     }
     WriteHtmlRow(sw, "Test:", _htmlSupport.GetLink(report.Test.Name, report.Test.Url));
     WriteHtmlRow(sw, "Result: ", GetResultAsHtml(report.Result.Result));
     WriteHtmlRow(sw, "Tolerance: ", report.Result.Tolerance);
     WriteHtmlRow(sw, "Distortion: ", report.Result.Distortion);
     sw.Write(_htmlSupport.GetTagEnd("table"));
 }
        private string GetSuitesHtml(ReportSet set)
        {
            var template = new TemplateCreator(_argProc, TemplateCreator.TemplateNameCombinedReportTestPart);

            template.SetTemplateParam(TemplateCreator.TemplateParamSuiteName, set.CsvFileName);
            template.SetTemplateParam(TemplateCreator.TemplateParamSuiteReportLink,
                                      _htmlSupport.GetLink("view report", Path.GetFileName(set.FilePath)));
            template.SetTemplateParam(TemplateCreator.TemplateParamSuiteResult,
                                      _htmlSupport.GetHtmlColoredForResult(set.OverallResult, set.OverallResult.ToString()));
            template.SetTemplateParam(TemplateCreator.TemplateParamSuiteTestsPassed, set.CountTestsPassed);
            template.SetTemplateParam(TemplateCreator.TemplateParamSuiteTestsTotal, set.CountTests);

            return(template.ToString());
        }