public void AddFeature(FeatureData data) { foreach (var writer in writers) { writer.AddFeature(data); } }
public void AddFeature(FeatureData data) { consoleReport.AppendLine(data.title); consoleReport.AppendLine(data.featureResult); consoleReport.AppendLine(data.featureEvidence.BuildEvidenceForConsole()); consoleReport.AppendLine(messages.Divider); }
public Output(IPrint printTo, string outputPath = null, IErrorReporter errorReporter = null) { outputWriter = printTo; errOutput = errorReporter ?? new NullErrorObject(); featData = new FeatureData(); writeTo = outputPath; }
public void AddFeature(FeatureData data) { var featureResults = new StringBuilder(); featureResults.Append(WebElementBuilder.FormatParagraph(data.featureResult)); featureResults.Append(data.featureEvidence.BuildEvidenceForHTML()); string featureTitle; switch (data.featurePass) { case true: featureTitle = WebElementBuilder.FormatPassedFeatureTitle(new WebTitleElements() { score = data.score + "%", rawScore = data.rawScore + "%", weighting = data.weighting.ToString(), title = data.title, }); break; case false: featureTitle = WebElementBuilder.FormatFailedFeatureTitle(new WebTitleElements() { score = data.score + "%", rawScore = data.rawScore + "%", weighting = data.weighting.ToString(), title = data.title, }); break; default: const char dash = (char)0x2013; featureTitle = WebElementBuilder.FormatInconclusiveFeatureTitle(new WebTitleElements() { score = dash.ToString(), rawScore = dash.ToString(), weighting = dash.ToString(), title = data.title, }); break; } features.Append(WebElementBuilder.FormatAccordionElement(new WebAccordionData() { featureTitle = featureTitle, content = featureResults.ToString(), helperMessage = data.featureHelperMessage, })); }