void WriteOutHtmlReport(IEnumerable<Story> stories) { const string error = "There was an error compiling the html report: "; var htmlFullFileName = Path.Combine(_configuration.OutputPath, _configuration.OutputFileName); var viewModel = new HtmlReportViewModel(_configuration, stories); ShouldTheReportUseCustomization(viewModel); string report; try { report = new HtmlReportBuilder(viewModel).BuildReportHtml(); } catch (Exception ex) { report = error + ex.Message; } File.WriteAllText(htmlFullFileName, report); }
void WriteOutHtmlReport(IEnumerable <Story> stories) { const string error = "There was an error compiling the html report: "; var htmlFullFileName = Path.Combine(_configuration.OutputPath, _configuration.OutputFileName); var viewModel = new HtmlReportViewModel(_configuration, stories); ShouldTheReportUseCustomization(viewModel); string report; try { report = new HtmlReportBuilder(viewModel).BuildReportHtml(); } catch (Exception ex) { report = error + ex.Message; } File.WriteAllText(htmlFullFileName, report); }