/// <summary> /// Returns the Gherkin Step for the block. /// </summary> /// <param name="block">The block.</param> /// <returns>The corresponding step.</returns> public static GherkinStep Step(this GherkinScenarioBlock block) { switch (block) { case GherkinScenarioBlock.Given: return(GherkinStep.Given); case GherkinScenarioBlock.When: return(GherkinStep.When); case GherkinScenarioBlock.Then: return(GherkinStep.Then); default: return(GherkinStep.None); } }
public ScenarioStepBuilder(GherkinScenarioBlock scenario, ILanguageSyntax <GherkinStep> step, string text) { this.scenarioStep = new BlockStep(scenario, step, text); }
public IEnumerable <IGherkinBlockStep> Parent(GherkinScenarioBlock parent) { return(this.Where(x => x.Parent == parent && x.Step.Syntax != parent.Step())); }
public BlockStep(GherkinScenarioBlock parent, ILanguageSyntax <GherkinStep> step, string description) { this.Parent = parent; this.Step = step; this.Description = description; }