public void BackgroundBuilderBuildNoSteps() { var sut = new BackgroundBuilder(Internationalization.Default, string.Empty); sut.AddDescription("a description of the background"); var result = sut.Build(); result.Description.Should().Contain("a description of the background"); result.Keyword.Syntax.Should().Be(GherkinKeyword.Background); result.Steps.Count().Should().Be(0); }
public void BackgroundBuilderWithOneStep() { var sut = new BackgroundBuilder(Internationalization.Default, string.Empty); sut.AddStep(this); var result = sut.Build(); result.Steps.Count().Should().Be(1); var step = result.Steps.ElementAt(0); step.Parent.Should().Be(GherkinScenarioBlock.Given); step.Step.Syntax.Should().Be(GherkinStep.Given); step.Description.Should().Contain("the system is in this state"); }
public void AddBackground(BackgroundBuilder backgroundBuilder) { this.background = backgroundBuilder; }
public void GherkinBlockShouldBe() { var sut = new BackgroundBuilder(Internationalization.Default, string.Empty); sut.Keyword.Syntax.Should().Be(GherkinKeyword.Background); }