public void Format(Body body, Scenario background) { var headerParagraph = new Paragraph(new ParagraphProperties(new ParagraphStyleId { Val = "Heading2" })); var backgroundKeyword = GetLocalizedBackgroundKeyword(); headerParagraph.Append(new Run(new RunProperties(new Bold()), new Text(backgroundKeyword))); var table = new Table(); table.Append(GenerateTableProperties()); var row = new TableRow(); var cell = new TableCell(); cell.Append(headerParagraph); foreach (var descriptionSentence in WordDescriptionFormatter.SplitDescription(background.Description)) { cell.Append(CreateNormalParagraph(descriptionSentence)); } foreach (var step in background.Steps) { cell.Append(WordStepFormatter.GenerateStepParagraph(step)); } cell.Append(CreateNormalParagraph("")); // Is there a better way to generate a new empty line? row.Append(cell); table.Append(row); body.Append(table); }
public WordFeatureFormatter(WordScenarioFormatter wordScenarioFormatter, WordScenarioOutlineFormatter wordScenarioOutlineFormatter, WordStyleApplicator wordStyleApplicator, WordDescriptionFormatter wordDescriptionFormatter, Configuration configuration, ITestResults nunitResults) { this.wordScenarioFormatter = wordScenarioFormatter; this.wordScenarioOutlineFormatter = wordScenarioOutlineFormatter; this.wordStyleApplicator = wordStyleApplicator; this.wordDescriptionFormatter = wordDescriptionFormatter; this.configuration = configuration; this.nunitResults = nunitResults; }
public WordFeatureFormatter(WordScenarioFormatter wordScenarioFormatter, WordScenarioOutlineFormatter wordScenarioOutlineFormatter, WordStyleApplicator wordStyleApplicator, WordDescriptionFormatter wordDescriptionFormatter, WordBackgroundFormatter wordBackgroundFormatter, Configuration configuration, ITestResults nunitResults) { this.wordScenarioFormatter = wordScenarioFormatter; this.wordScenarioOutlineFormatter = wordScenarioOutlineFormatter; this.wordStyleApplicator = wordStyleApplicator; this.wordDescriptionFormatter = wordDescriptionFormatter; this.wordBackgroundFormatter = wordBackgroundFormatter; this.configuration = configuration; this.nunitResults = nunitResults; }
public WordFeatureFormatter( WordScenarioFormatter wordScenarioFormatter, WordScenarioOutlineFormatter wordScenarioOutlineFormatter, WordStyleApplicator wordStyleApplicator, WordDescriptionFormatter wordDescriptionFormatter, WordBackgroundFormatter wordBackgroundFormatter, IConfiguration configuration, ITestResults testResults) { this.wordScenarioFormatter = wordScenarioFormatter; this.wordScenarioOutlineFormatter = wordScenarioOutlineFormatter; this.wordStyleApplicator = wordStyleApplicator; this.wordDescriptionFormatter = wordDescriptionFormatter; this.wordBackgroundFormatter = wordBackgroundFormatter; this.configuration = configuration; this.testResults = testResults; }