private void ExecuteStepDefinitionWithStep(StepDefinition stepDefinition, Step step) { stepDefinition.StepSet.StepRunner = this; stepDefinition.StepSet.BeforeStep(); try { new StepCaller(stepDefinition, new TypeCaster(this.transforms)).Call(step); } catch (IndexOutOfRangeException e) { throw new ParameterMismatchException( "The number of paramters is not equal to the number of captured groups in the step definition in", stepDefinition.StepSet.GetType().Name + " on regex \n" + stepDefinition.Regex); } stepDefinition.StepSet.AfterStep(); }
public StepCaller(StepDefinition step, TypeCaster typeCaster) : base(typeCaster, step) { }