Beispiel #1
0
        public void Examples(string keyword, string name, string description, GherkinBufferSpan headerSpan, GherkinBufferSpan descriptionSpan)
        {
            // RaringCoder: "Examples:" can occur in-line in a scenario block, so we have to check here to see if a
            //              table from a prior step needs creating.
            CheckTableOutline();

            var editorLine = headerSpan.StartPosition.Line;

            OnCloseLevel2Outlinings(CalculateRegionEndLine(editorLine));

            RegisterKeyword(keyword, headerSpan);
            ColorizeSpan(descriptionSpan, classifications.Description);

            ScenarioOutlineExampleSet exampleSet = new ScenarioOutlineExampleSet(keyword, name,
                                                                                 editorLine - CurrentFileBlockBuilder.KeywordLine);

            CurrentFileBlockBuilder.ExampleSets.Add(exampleSet);
            currentStep = null;

            CloseLevel2Outlinings += regionEndLine =>
            {
                if (regionEndLine > editorLine)
                {
                    AddOutline(
                        editorLine,
                        regionEndLine,
                        exampleSet.FullTitle());
                }
            };
        }
        public void Examples(string keyword, string name, string description, GherkinBufferSpan headerSpan, GherkinBufferSpan descriptionSpan)
        {
            var editorLine = headerSpan.StartPosition.Line;

            OnCloseLevel2Outlinings(CalculateRegionEndLine(editorLine));

            RegisterKeyword(keyword, headerSpan);
            ColorizeSpan(descriptionSpan, classifications.Description);

            ScenarioOutlineExampleSet exampleSet = new ScenarioOutlineExampleSet(keyword, name,
                                                                                 editorLine - CurrentFileBlockBuilder.KeywordLine);

            CurrentFileBlockBuilder.ExampleSets.Add(exampleSet);

            CloseLevel2Outlinings += regionEndLine =>
            {
                if (regionEndLine > editorLine)
                {
                    AddOutline(
                        editorLine,
                        regionEndLine,
                        exampleSet.FullTitle());
                }
            };
        }
        public void Examples(string keyword, string name, string description, GherkinBufferSpan headerSpan, GherkinBufferSpan descriptionSpan)
        {
            var editorLine = headerSpan.StartPosition.Line;
            OnCloseLevel2Outlinings(CalculateRegionEndLine(editorLine));

            RegisterKeyword(keyword, headerSpan);
            ColorizeSpan(descriptionSpan, classifications.Description);

            ScenarioOutlineExampleSet exampleSet = new ScenarioOutlineExampleSet(keyword, name, 
                editorLine - CurrentFileBlockBuilder.KeywordLine);
            CurrentFileBlockBuilder.ExampleSets.Add(exampleSet);

            CloseLevel2Outlinings += regionEndLine =>
                                         {
                                             if (regionEndLine > editorLine)
                                                 AddOutline(
                                                     editorLine,
                                                     regionEndLine,
                                                     exampleSet.FullTitle());
                                         };
        }
        public void Examples(string keyword, string name, string description, GherkinBufferSpan headerSpan, GherkinBufferSpan descriptionSpan)
        {
            // RaringCoder: "Examples:" can occur in-line in a scenario block, so we have to check here to see if a 
            //              table from a prior step needs creating.
            CheckTableOutline();

            var editorLine = headerSpan.StartPosition.Line;
            OnCloseLevel2Outlinings(CalculateRegionEndLine(editorLine));

            RegisterKeyword(keyword, headerSpan);
            ColorizeSpan(descriptionSpan, classifications.Description);

            ScenarioOutlineExampleSet exampleSet = new ScenarioOutlineExampleSet(keyword, name, 
                editorLine - CurrentFileBlockBuilder.KeywordLine);
            CurrentFileBlockBuilder.ExampleSets.Add(exampleSet);
            currentStep = null;

            CloseLevel2Outlinings += regionEndLine =>
                                         {
                                             if (regionEndLine > editorLine)
                                                 AddOutline(
                                                     editorLine,
                                                     regionEndLine,
                                                     exampleSet.FullTitle());
                                         };
        }