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