private void SetHeader(CombinedReportData combined, TemplateCreator template)
        {
            template.SetTemplateParam(TemplateCreator.TemplateParamCombinedDuration, combined.Duration);

            template.SetTemplateParam(TemplateCreator.TemplateParamCombinedResult, GetResultsAsHtml(combined.OverallResults));

            template.SetTemplateParam(TemplateCreator.TemplateParamCombinedStartTime, combined.StartTime);

            template.SetTemplateParam(TemplateCreator.TemplateParamCombinedTestsPassed, combined.TotalPassed);

            template.SetTemplateParam(TemplateCreator.TemplateParamCombinedTestsTotal, combined.TotalTests);
        }
        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());
        }
        internal void CreateReport(ArgsProcessor argProc)
        {
            _argProc = argProc;
            var dirManager = new DirectoryManager(argProc);

            _combinedPersist = new CombinedReportPersistance(dirManager);

            var combined = _combinedPersist.LoadCombinedData();

            var template = new TemplateCreator(argProc, TemplateCreator.TemplateNameCombinedReport);

            SetHeader(combined, template);

            string suitesHtml = GetSuitesHtml(combined.ReportSets);

            template.SetTemplateParam(TemplateCreator.TemplateParamCombinedSuiteParts, suitesHtml);

            var outPath = dirManager.GetCombinedReportHtmlPath();

            template.Save(outPath);
        }