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; }
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(); }
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; }