public static IGherkinFileBlock Shift(this IGherkinFileBlock fileBlock, int lineShift) { if (fileBlock == null) { throw new ArgumentNullException("fileBlock"); } if (fileBlock is IInvalidFileBlock) { return(Shift((IInvalidFileBlock)fileBlock, lineShift)); } if (fileBlock is IBackgroundBlock) { return(Shift((IBackgroundBlock)fileBlock, lineShift)); } if (fileBlock is IScenarioOutlineBlock) { return(Shift((IScenarioOutlineBlock)fileBlock, lineShift)); } if (fileBlock is IScenarioBlock) { return(Shift((IScenarioBlock)fileBlock, lineShift)); } // we cannot shift header block throw new NotSupportedException("block type not supported: " + fileBlock.GetType()); }
public static int GetEndLine(this IGherkinFileBlock gherkinFileBlock) { return(gherkinFileBlock.KeywordLine + gherkinFileBlock.BlockRelativeEndLine); }
public static string FullTitle(this IGherkinFileBlock block) { return(FormatBlockFullTitle(block.Keyword, block.Title)); }