private static Gherkin.Ast.Scenario CreateTestScenario() { var tags = new Gherkin.Ast.Tag[] { new Gherkin.Ast.Tag(null, "test") }; var location = new Gherkin.Ast.Location(1, 1); var steps = new Gherkin.Ast.Step[] { new Gherkin.Ast.Step(null, null, "step", null) }; return new Gherkin.Ast.Scenario(tags, location, "keyword", "name", "description", steps); }
/// <summary> /// Converts the provided <see cref="Gherkin.Ast.Location"/> instance into a <see cref="SourceLocation"/> instance. /// </summary> /// <param name="location">The <see cref="Gherkin.Ast.Location"/> instance that should be converted.</param> /// <returns>A <see cref="SourceLocation"/> instance containing the necessary data from the provided <paramref name="location"/>.</returns> public static SourceLocation ConvertToSourceLocation(this Gherkin.Ast.Location location) { if (location == null) { return(null); } return(new SourceLocation { Column = location.Column, Line = location.Line }); }