Exemple #1
0
        public static StepMethodInfo FromMethodInfo(MethodInfo methodInfo, Feature featureInstance)
        {
            if (methodInfo == null)
            {
                throw new ArgumentNullException(nameof(methodInfo));
            }

            var stepDefinitionAttribute = methodInfo.GetCustomAttributes <BaseStepDefinitionAttribute>();

            return(new StepMethodInfo(
                       ScenarioStepPattern.ListFromStepAttributes(stepDefinitionAttribute),
                       StepMethodArgument.ListFromMethodInfo(methodInfo),
                       new MethodInfoWrapper(methodInfo, featureInstance)));
        }