Exemple #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;
        }
Exemple #2
0
 public void background(string keyword, string name, string description, int line)
 {
     this.isInExample = false;
     this.featureElementState.SetBackgroundActive();
     this.backgroundBuilder = new ScenarioBuilder();
     this.backgroundBuilder.SetName(name);
     this.backgroundBuilder.SetDescription(description);
 }
Exemple #3
0
        public void scenario(string keyword, string name, string description, int line)
        {
            this.CaptureAndStoreRemainingElements();

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

            this.isInExample = false;
            this.featureElementState.SetScenarioActive();
            this.scenarioBuilder = new ScenarioBuilder();
            this.scenarioBuilder.SetName(name);
            this.scenarioBuilder.SetDescription(description);
            this.scenarioBuilder.AddTags(this.scenarioTags);
            this.scenarioTags.Clear();
        }
Exemple #5
0
 public void background(string keyword, string name, string description, int line)
 {
     this.isInExample = false;
     this.featureElementState.SetBackgroundActive();
     this.backgroundBuilder = new ScenarioBuilder();
     this.backgroundBuilder.SetName(name);
     this.backgroundBuilder.SetDescription(description);
 }
Exemple #6
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;
        }