public static IScenarioOutlineBlock Shift(this IScenarioOutlineBlock fileBlock, int lineShift) { if (fileBlock == null) { throw new ArgumentNullException("fileBlock"); } UnWrapShiftdFileBlock(ref fileBlock, ref lineShift); return(new ShiftedScenarioOutlineBlock(fileBlock, lineShift)); }
public static GherkinStep GetSubstitutedStep(this GherkinStep step, IScenarioOutlineBlock scenarioOutlineBlock) { var firstNonEmptyExampleSet = scenarioOutlineBlock.ExampleSets.FirstOrDefault(es => es.ExamplesTable != null && es.ExamplesTable.RowCount > 0); if (firstNonEmptyExampleSet == null) { return(step); } return(GetSubstitutedStep(step, firstNonEmptyExampleSet.ExamplesTable.Rows.First())); }
private static IEnumerable <GherkinStep> GetSubstitutedSteps(IScenarioOutlineBlock scenarioOutlineBlock) { var firstNonEmptyExampleSet = scenarioOutlineBlock.ExampleSets.FirstOrDefault(es => es.ExamplesTable != null && es.ExamplesTable.RowCount > 0); if (firstNonEmptyExampleSet == null) { return(scenarioOutlineBlock.Steps); } return(scenarioOutlineBlock.Steps.Select(step => GetSubstitutedStep(step, firstNonEmptyExampleSet.ExamplesTable.Rows.First()))); }
public static ScenarioOutlineExamplesRow GetExamplesRowFromPosition(this IScenarioOutlineBlock scenatioOutline, int line) { foreach (var scenarioOutlineExampleSet in scenatioOutline.ExampleSets) { var examplesRow = scenarioOutlineExampleSet.ExamplesTable.FindByBlockRelativeLine(line - scenatioOutline.KeywordLine); if (examplesRow != null) { return(examplesRow); } } return(null); }
public static GherkinStep GetSubstitutedStep(this GherkinStep step, IScenarioOutlineBlock scenarioOutlineBlock) { var firstNonEmptyExampleSet = scenarioOutlineBlock.ExampleSets.FirstOrDefault(es => es.ExamplesTable != null && es.ExamplesTable.RowCount > 0); if (firstNonEmptyExampleSet == null) return step; return GetSubstitutedStep(step, firstNonEmptyExampleSet.ExamplesTable.Rows.First()); }
private static IEnumerable<GherkinStep> GetSubstitutedSteps(IScenarioOutlineBlock scenarioOutlineBlock) { var firstNonEmptyExampleSet = scenarioOutlineBlock.ExampleSets.FirstOrDefault(es => es.ExamplesTable != null && es.ExamplesTable.RowCount > 0); if (firstNonEmptyExampleSet == null) return scenarioOutlineBlock.Steps; return scenarioOutlineBlock.Steps.Select(step => GetSubstitutedStep(step, firstNonEmptyExampleSet.ExamplesTable.Rows.First())); }