예제 #1
0
        public Action ResolveStep(StringStep stringStep)
        {
            var actionMethodInfo = _actionCatalog.GetAction(stringStep);

            if (actionMethodInfo == null)
            {
                return(null);
            }

            var parameters = _parameterConverter.GetParametersForStep(stringStep);

            return(() =>
            {
                actionMethodInfo.ExecuteNotificationMethod(typeof(BeforeStepAttribute));
                actionMethodInfo.MethodInfo.Invoke(_stepHelper, parameters);
                actionMethodInfo.ExecuteNotificationMethod(typeof(AfterStepAttribute));
            });
        }