private ReportStep CloneTo(SpecFlowStep step, string currentBlock, string sampleText) { ReportStep newStep = null; if (currentBlock == "When") newStep = new ReportStep(step.Location, step.Keyword, sampleText, step.Argument, step.StepKeyword, Parser.ScenarioBlock.When); else if (currentBlock == "Then") newStep = new ReportStep(step.Location, step.Keyword, sampleText, step.Argument, step.StepKeyword, Parser.ScenarioBlock.Then); else // Given or empty newStep = new ReportStep(step.Location, step.Keyword, sampleText, step.Argument, step.StepKeyword, Parser.ScenarioBlock.Given); Debug.Assert(newStep != null); return newStep; }
private SpecFlowStep Clone(SpecFlowStep step, StepArgument stepArgument) { return new SpecFlowStep(step.Location, step.Keyword, step.Text, stepArgument, step.StepKeyword, step.ScenarioBlock); }