예제 #1
0
        public void ProcessExample(ExampleBuilder examplebuilder)
        {
            if (!string.IsNullOrEmpty(examplebuilder.Title) &&
                examples.Any(s => s.Title.Equals(examplebuilder.Title)))
                throw new GherkinSemanticErrorException(
                    string.Format("Scenario outline already contains an example set name '{0}'", examplebuilder.Title),
                    examplebuilder.Position);

            examples.Add(examplebuilder);
        }
예제 #2
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);
        }
예제 #3
0
        public void ProcessExample(ExampleBuilder examplebuilder)
        {
            if (!string.IsNullOrEmpty(examplebuilder.Title) &&
                examples.Any(s => s.Title.Equals(examplebuilder.Title)))
            {
                throw new GherkinSemanticErrorException(
                          string.Format("Scenario outline already contains an example set name '{0}'", examplebuilder.Title),
                          examplebuilder.Position);
            }

            examples.Add(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);
        }
예제 #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);
 }
예제 #6
0
 public void ProcessExample(ExampleBuilder examplebuilder)
 {
     examples.Add(examplebuilder);
 }