private static string Format(IFixtureStep item) { return(string.Format( CultureInfo.CurrentCulture, "[{0}(\"{1}\")]", item.GherkinAttribute.Name.Replace("Attribute", string.Empty), item.Text.Replace('\n', ' '))); }
public SpockFixture( IGherkinFeature gherkin, IFixtureInvariants fixtureInvariants, IFixtureStep feature, IEnumerable <string> comments, IFixtureBackground background, IFixtureMethods methods, ISpockOptions options) : base(options, fixtureInvariants) { this.gherkin = gherkin; this.FixtureInvariants = fixtureInvariants; this.GherkinAttributes = feature; this.XmlDocComments = new SpockCollection <string>(comments); this.Background = background; this.FixtureMethods = methods; }
public void Add(IFixtureStep item) { if (item == null) { return; } if (item.GherkinAttribute == typeof(GivenAttribute)) { this.Given = item; this.HasGiven = true; } else if (item.GherkinAttribute == typeof(WhenAttribute)) { this.When = item; this.HasWhen = true; } else { this.Then = item; this.HasThen = true; } }
public void AddChild(IFixtureStep child) { this.children.Add(child); }
public FixtureBackground(IFixtureStep background) { this.Background = background; this.GherkinAttribute = background.GherkinAttribute; }