private void ShouldTheReportUseCustomization(HtmlReportViewModel viewModel) { var customStylesheet = Path.Combine(_configuration.OutputPath, "bddifyCustom.css"); viewModel.UseCustomStylesheet = File.Exists(customStylesheet); var customJavascript = Path.Combine(_configuration.OutputPath, "bddifyCustom.js"); viewModel.UseCustomJavascript = File.Exists(customJavascript); }
private void ShouldTheReportUseCustomization(HtmlReportViewModel viewModel) { var customStylesheet = Path.Combine(_configuration.OutputPath, "bddifyCustom.css"); viewModel.UseCustomStylesheet = File.Exists(customStylesheet); var customJavascript = Path.Combine(_configuration.OutputPath, "bddifyCustom.js"); viewModel.UseCustomJavascript = File.Exists(customJavascript); }
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); }
public HtmlReportBuilder(HtmlReportViewModel viewModel) { _viewModel = viewModel; _html = new StringBuilder(); }
public HtmlReportBuilder(HtmlReportViewModel viewModel) { _viewModel = viewModel; _html = new StringBuilder(); }