Beispiel #1
0
        public void step(string keyword, string text, int line)
        {
            FlushDelayedCalls();

            ResetStepArguments();

            var stepSpan = ProcessSimpleLanguageElement(line);

            StepKeyword   stepKeyword   = gherkinDialect.GetStepKeyword(keyword) ?? StepKeyword.And; // if we dont find it, we suppose an "and"
            ScenarioBlock scenarioBlock = CalculateScenarioBlock(stepKeyword);

            gherkinListener.Step(keyword, stepKeyword, scenarioBlock, text, stepSpan);
        }
        private StepKeyword?GetStepKeyword(ITextSnapshot snapshot, int lineNumer, GherkinDialect gherkinDialect)
        {
            var word = GetFirstWordOfLine(snapshot, lineNumer);

            return(gherkinDialect.GetStepKeyword(word));
        }