Example #1
0
        private void CaptureAndStoreRemainingElements()
        {
            if (featureElementState.IsBackgroundActive)
            {
                backgroundBuilder.AddStep(stepBuilder.GetResult());
                theFeature.AddBackground(backgroundBuilder.GetResult());
            }
            else if (featureElementState.IsScenarioActive)
            {
                if (stepBuilder != null)
                {
                    scenarioBuilder.AddStep(stepBuilder.GetResult());
                }
                theFeature.AddFeatureElement(scenarioBuilder.GetResult());
            }
            else if (featureElementState.IsScenarioOutlineActive)
            {
                if (stepBuilder != null)
                {
                    scenarioOutlineBuilder.AddStep(stepBuilder.GetResult());
                }
                theFeature.AddFeatureElement(scenarioOutlineBuilder.GetResult());
            }

            stepBuilder            = null;
            scenarioBuilder        = null;
            scenarioOutlineBuilder = null;
            backgroundBuilder      = null;
        }
Example #2
0
 public void background(string keyword, string name, string description, int line)
 {
     isInExample = false;
     featureElementState.SetBackgroundActive();
     backgroundBuilder = new ScenarioBuilder();
     backgroundBuilder.SetName(name);
     backgroundBuilder.SetDescription(description);
 }
Example #3
0
 public void background(string keyword, string name, string description, int line)
 {
     isInExample = false;
     featureElementState.SetBackgroundActive();
     backgroundBuilder = new ScenarioBuilder();
     backgroundBuilder.SetName(name);
     backgroundBuilder.SetDescription(description);
 }
Example #4
0
        public void scenario(string keyword, string name, string description, int line)
        {
            CaptureAndStoreRemainingElements();

            isInExample = false;
            featureElementState.SetScenarioActive();
            scenarioBuilder = new ScenarioBuilder();
            scenarioBuilder.SetName(name);
            scenarioBuilder.SetDescription(description);
            scenarioBuilder.AddTags(scenarioTags);
            scenarioTags.Clear();
        }
Example #5
0
        public void scenario(string keyword, string name, string description, int line)
        {
            CaptureAndStoreRemainingElements();

            isInExample = false;
            featureElementState.SetScenarioActive();
            scenarioBuilder = new ScenarioBuilder();
            scenarioBuilder.SetName(name);
            scenarioBuilder.SetDescription(description);
            scenarioBuilder.AddTags(scenarioTags);
            scenarioTags.Clear();
        }
Example #6
0
        private void CaptureAndStoreRemainingElements()
        {
            if (featureElementState.IsBackgroundActive)
            {
                backgroundBuilder.AddStep(stepBuilder.GetResult());
                theFeature.AddBackground(backgroundBuilder.GetResult());
            }
            else if (featureElementState.IsScenarioActive)
            {
                if (stepBuilder != null) scenarioBuilder.AddStep(stepBuilder.GetResult());
                theFeature.AddFeatureElement(scenarioBuilder.GetResult());
            }
            else if (featureElementState.IsScenarioOutlineActive)
            {
                if (stepBuilder != null) scenarioOutlineBuilder.AddStep(stepBuilder.GetResult());
                theFeature.AddFeatureElement(scenarioOutlineBuilder.GetResult());
            }

            stepBuilder = null;
            scenarioBuilder = null;
            scenarioOutlineBuilder = null;
            backgroundBuilder = null;
        }
Example #7
0
        private void CaptureAndStoreRemainingElements()
        {
            if (this.featureElementState.IsBackgroundActive)
            {
                this.backgroundBuilder.AddStep(this.stepBuilder.GetResult());
                this.theFeature.AddBackground(this.backgroundBuilder.GetResult());
            }
            else if (this.featureElementState.IsScenarioActive)
            {
                if (this.stepBuilder != null) this.scenarioBuilder.AddStep(this.stepBuilder.GetResult());
                this.theFeature.AddFeatureElement(this.scenarioBuilder.GetResult());
            }
            else if (this.featureElementState.IsScenarioOutlineActive)
            {
                if (this.stepBuilder != null) this.scenarioOutlineBuilder.AddStep(this.stepBuilder.GetResult());
                this.theFeature.AddFeatureElement(this.scenarioOutlineBuilder.GetResult());
            }

            this.stepBuilder = null;
            this.scenarioBuilder = null;
            this.scenarioOutlineBuilder = null;
            this.backgroundBuilder = null;
        }