示例#1
0
        /// <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);
 }
示例#3
0
 public IEnumerable <IGherkinBlockStep> Parent(GherkinScenarioBlock parent)
 {
     return(this.Where(x => x.Parent == parent && x.Step.Syntax != parent.Step()));
 }
示例#4
0
 public BlockStep(GherkinScenarioBlock parent, ILanguageSyntax <GherkinStep> step, string description)
 {
     this.Parent      = parent;
     this.Step        = step;
     this.Description = description;
 }