private void ExecuteStep(SpecFlowStep step) { var docStringArg = step.Argument as DocString; string docString = docStringArg?.Content; var dataTableArg = step.Argument as DataTable; Table dataTable = null; if (dataTableArg != null && dataTableArg.Rows.Any()) { dataTable = new Table(dataTableArg.Rows.First().Cells.Select(c => c.Value).ToArray()); foreach (var row in dataTableArg.Rows.Skip(1)) { dataTable.AddRow(row.Cells.Select(c => c.Value).ToArray()); } } switch (step.StepKeyword) { case StepKeyword.Given: testRunner.Given(step.Text, docString, dataTable, step.Keyword); break; case StepKeyword.When: testRunner.When(step.Text, docString, dataTable, step.Keyword); break; case StepKeyword.Then: testRunner.Then(step.Text, docString, dataTable, step.Keyword); break; case StepKeyword.And: testRunner.And(step.Text, docString, dataTable, step.Keyword); break; case StepKeyword.But: testRunner.But(step.Text, docString, dataTable, step.Keyword); break; } }
public static void But(this ITestRunner testRunner, string text, string multilineTextArg) { testRunner.But(text, multilineTextArg, null); }
public static void But(this ITestRunner testRunner, string text) { testRunner.But(text, null, null); }
public void But(string step, string multilineTextArg, Table tableArg) { testRunner.But(step, multilineTextArg, tableArg); }
public void But(string text, string multilineTextArg, Table tableArg, string keyword = null) { _runner.But(text, multilineTextArg, tableArg, keyword); _outputWriter.WriteStep(text); GhprPluginHelper.TestExecutionEngineHelper.OnBut(_engine.ScenarioContext); }
public void But(string text, string multilineTextArg, Table tableArg, string keyword = null) { _TestRunner.But(Transform(text), Transform(multilineTextArg), Transform(tableArg), keyword); }