예제 #1
0
        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();
        }
예제 #2
0
 public StepCaller(StepDefinition step, TypeCaster typeCaster)
     : base(typeCaster, step)
 {
 }