public Feature(string title, Tags tags, string description, Background background, params Scenario[] scenarios) { Tags = tags; Description = description ?? string.Empty; Background = background; Scenarios = scenarios; Title = title; }
public Feature(Text title, Tags tags, DescriptionLine[] description, Background background, params Scenario[] scenarios) { Tags = tags; Description = description == null ? string.Empty : string.Join(Environment.NewLine, description.Select(d => d.LineText.Trim()).ToArray()); Background = background; Scenarios = scenarios; Title = title.Value; }
public Feature(string keyword, string title, Tags tags, string description, Background background, Scenario[] scenarios, Comment[] comments) { Keyword = keyword; Title = title; Tags = tags; Description = description ?? string.Empty; Background = background; Scenarios = scenarios; Comments = comments; }
/// <summary> /// Converts the provided <see cref="SpecFlow.Background"/> instance into a <see cref="Augurk.Entities.Background"/> instance. /// </summary> /// <param name="background">The <see cref="SpecFlow.Background"/> instance that should be converted.</param> /// <returns>The converted <see cref="Augurk.Entities.Background"/> instance.</returns> public static Background ConvertToBackground(this SpecFlow.Background background) { if (background == null) { return(null); } return(new Background() { Title = background.Title, Keyword = background.Keyword, Steps = background.Steps.ConvertToSteps() }); }
protected virtual void AppendBackgroundLine(Background background, StringBuilder result) { AppendNodeLine(result, background.FilePosition, "{0}: {1}", background.Keyword, background.Title); if (!string.IsNullOrEmpty(background.Description)) AppendMulitLine(result, background.Description); }
// $ANTLR end "descriptionLine" // $ANTLR start "background" // SpecFlowLangWalker.g:76:1: background returns [Background background] : ^( BACKGROUND (title_= text )? steps_= steps fp_= fileposition ) ; public Background background() // throws RecognitionException [1] { Background background = default(Background); Text title_ = default(Text); ScenarioSteps steps_ = default(ScenarioSteps); FilePosition fp_ = default(FilePosition); try { // SpecFlowLangWalker.g:81:5: ( ^( BACKGROUND (title_= text )? steps_= steps fp_= fileposition ) ) // SpecFlowLangWalker.g:82:3: ^( BACKGROUND (title_= text )? steps_= steps fp_= fileposition ) { Match(input,BACKGROUND,FOLLOW_BACKGROUND_in_background485); Match(input, Token.DOWN, null); // SpecFlowLangWalker.g:83:13: (title_= text )? int alt7 = 2; int LA7_0 = input.LA(1); if ( (LA7_0 == TEXT) ) { alt7 = 1; } switch (alt7) { case 1 : // SpecFlowLangWalker.g:83:14: title_= text { PushFollow(FOLLOW_text_in_background502); title_ = text(); state.followingStackPointer--; } break; } PushFollow(FOLLOW_steps_in_background520); steps_ = steps(); state.followingStackPointer--; PushFollow(FOLLOW_fileposition_in_background536); fp_ = fileposition(); state.followingStackPointer--; Match(input, Token.UP, null); } background = new Background(title_, steps_); background.FilePosition = fp_; } catch (RecognitionException re) { ReportError(re); Recover(input,re); } finally { } return background; }