예제 #1
0
 public WordScenarioFormatter(WordStepFormatter wordStepFormatter, Configuration configuration,
                              ITestResults nunitResults)
 {
     this.wordStepFormatter = wordStepFormatter;
     this.configuration     = configuration;
     this.nunitResults      = nunitResults;
 }
 public WordScenarioOutlineFormatter(WordStepFormatter wordStepFormatter, WordTableFormatter wordTableFormatter, IConfiguration configuration, ITestResults testResults)
 {
     this.wordStepFormatter = wordStepFormatter;
     this.wordTableFormatter = wordTableFormatter;
     this.configuration = configuration;
     this.testResults = testResults;
 }
 public WordScenarioOutlineFormatter(WordStepFormatter wordStepFormatter, WordTableFormatter wordTableFormatter, Configuration configuration, ITestResults testResults)
 {
     this.wordStepFormatter  = wordStepFormatter;
     this.wordTableFormatter = wordTableFormatter;
     this.configuration      = configuration;
     this.testResults        = testResults;
 }
예제 #4
0
        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);
        }
예제 #5
0
 public WordScenarioFormatter(WordStepFormatter wordStepFormatter, Configuration configuration,
                              ITestResults nunitResults)
 {
     this.wordStepFormatter = wordStepFormatter;
     this.configuration = configuration;
     this.nunitResults = nunitResults;
 }
 public WordScenarioOutlineFormatter(WordStepFormatter wordStepFormatter, WordTableFormatter wordTableFormatter, IConfiguration configuration, ITestResults testResults, ILanguageServicesRegistry languageServicesRegistry)
 {
     this.wordStepFormatter        = wordStepFormatter;
     this.wordTableFormatter       = wordTableFormatter;
     this.configuration            = configuration;
     this.testResults              = testResults;
     this.languageServicesRegistry = languageServicesRegistry;
 }