public PickleStep(PickleStepArgument argument, IEnumerable <string> astNodeIds, string id, string text, StepKeywordType type) { Id = id; Text = text; Argument = argument; AstNodeIds = astNodeIds.ToReadOnlyCollection(); Type = type; }
public Step(Location location, string keyword, StepKeywordType keywordType, string text, StepArgument argument) { Location = location; Keyword = keyword; KeywordType = keywordType; Text = text; Argument = argument; }
private void BuildScenario(List <Pickle> pickles, string language, IEnumerable <Tag> tags, Func <IEnumerable <PickleStep> > backgroundStepsFactory, string gherkinDocumentUri, Scenario scenario) { CurrentStepKeywordType = StepKeywordType.Unspecified; if (!scenario.Examples.Any()) { CompileScenario(pickles, backgroundStepsFactory, scenario, tags, language, gherkinDocumentUri); } else { CompileScenarioOutline(pickles, backgroundStepsFactory, scenario, tags, language, gherkinDocumentUri); } }
protected virtual StepKeywordType GetKeywordType(Step step, StepKeywordType lastStepKeywordType) { var stepKeywordType = step.KeywordType; switch (stepKeywordType) { case StepKeywordType.Context: case StepKeywordType.Action: case StepKeywordType.Outcome: case StepKeywordType.Unknown: return(stepKeywordType); case StepKeywordType.Conjunction: return(lastStepKeywordType == StepKeywordType.Unspecified || lastStepKeywordType == StepKeywordType.Unknown ? StepKeywordType.Context : lastStepKeywordType); default: return(StepKeywordType.Unspecified); } }
protected virtual PickleStep CreatePickleStep(Step step, string text, PickleStepArgument argument, IEnumerable <string> astNodeIds) { CurrentStepKeywordType = GetKeywordType(step, CurrentStepKeywordType); return(new PickleStep(argument, astNodeIds, _idGenerator.GetNewId(), text, CurrentStepKeywordType)); }