Ejemplo n.º 1
0
        public void Examples(string keyword, string name, string description, GherkinBufferSpan headerSpan, GherkinBufferSpan descriptionSpan)
        {
            var position = GetFilePosition(headerSpan.StartPosition);
            var exampleBuilder = new ExampleBuilder(name, description, position);
            tableProcessor = exampleBuilder;

            if (exampleProcessor == null)
                throw new GherkinSemanticErrorException(
                    "Examples can only be specified for a scenario outline.", position);
            exampleProcessor.ProcessExample(exampleBuilder);
        }
        public void Examples(string keyword, string name, string description, GherkinBufferSpan headerSpan, GherkinBufferSpan descriptionSpan)
        {
            var position       = GetFilePosition(headerSpan.StartPosition);
            var exampleBuilder = new ExampleBuilder(keyword, name, description, FlushTags(), position);

            tableProcessor = exampleBuilder;

            if (exampleProcessor == null)
            {
                throw new GherkinSemanticErrorException(
                          "Examples can only be specified for a scenario outline.", position);
            }
            exampleProcessor.ProcessExample(exampleBuilder);
        }
        public void Step(string keyword, StepKeyword stepKeyword, ScenarioBlock scenarioBlock, string text, GherkinBufferSpan stepSpan)
        {
            var position = GetFilePosition(stepSpan.StartPosition);

            stepBuilder    = new StepBuilder(keyword, stepKeyword, text, position, scenarioBlock);
            tableProcessor = stepBuilder;

            if (stepProcessor == null)
            {
                throw new GherkinSemanticErrorException(
                          "Steps can only be specified for scenarios or scenario outlines.", position);
            }

            stepProcessor.ProcessStep(stepBuilder);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TableMediator"/> class.
 /// </summary>
 /// <param name="tableProcessor">The table processor.</param>
 public TableMediator(ITableProcessor tableProcessor)
 {
     _tableProcessor = tableProcessor;
 }
Ejemplo n.º 5
0
 public void examples(string keyword, string name, string description, int line)
 {
     var exampleBuilder = new ExampleBuilder(name, description, new FilePosition(line));
     tableProcessor = exampleBuilder;
     exampleProcessor.ProcessExample(exampleBuilder);
 }
Ejemplo n.º 6
0
 public void step(string keyword, string text, int line)
 {
     stepBuilder = new StepBuilder(keyword, text, new FilePosition(line), i18n);
     tableProcessor = stepBuilder;
     stepProcessor.ProcessStep(stepBuilder);
 }
Ejemplo n.º 7
0
        public void Step(string keyword, StepKeyword stepKeyword, ScenarioBlock scenarioBlock, string text, GherkinBufferSpan stepSpan)
        {
            var position = GetFilePosition(stepSpan.StartPosition);
            stepBuilder = new StepBuilder(keyword, stepKeyword, text, position, scenarioBlock);
            tableProcessor = stepBuilder;

            if (stepProcessor == null)
                throw new GherkinSemanticErrorException(
                    "Steps can only be specified for scenarios or scenario outlines.", position);

            stepProcessor.ProcessStep(stepBuilder);
        }