Esempio n. 1
0
        private void CaptureAndStoreRemainingElements()
        {
            if (this.isInExample && this.exampleBuilder != null)
            {
                this.scenarioOutlineBuilder.AddExample(this.exampleBuilder.GetResult());
                this.exampleBuilder = null;
            }

            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;
        }
Esempio n. 2
0
        public void scenarioOutline(string keyword, string name, string description, int line)
        {
            this.CaptureAndStoreRemainingElements();

            this.isInExample = false;
            this.featureElementState.SetScenarioOutlineActive();
            this.scenarioOutlineBuilder = new ScenarioOutlineBuilder(new TableBuilder());
            this.scenarioOutlineBuilder.SetName(name);
            this.scenarioOutlineBuilder.SetDescription(description);
            this.scenarioOutlineBuilder.AddTags(this.scenarioTags);
            this.scenarioTags.Clear();
        }
Esempio n. 3
0
        private void CaptureAndStoreRemainingElements()
        {
			if (this.isInExample && this.exampleBuilder != null)
			{
				this.scenarioOutlineBuilder.AddExample(this.exampleBuilder.GetResult());
			    this.exampleBuilder = null;
			}
			
            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;
        }
Esempio n. 4
0
        public void scenarioOutline(string keyword, string name, string description, int line)
        {
            this.CaptureAndStoreRemainingElements();

            this.isInExample = false;
            this.featureElementState.SetScenarioOutlineActive();
            this.scenarioOutlineBuilder = new ScenarioOutlineBuilder(new TableBuilder());
            this.scenarioOutlineBuilder.SetName(name);
            this.scenarioOutlineBuilder.SetDescription(description);
            this.scenarioOutlineBuilder.AddTags(this.scenarioTags);
            this.scenarioTags.Clear();
        }