コード例 #1
0
 public IStepDefinitionBinding CreateStepBinding(StepDefinitionType type, string regexString, IBindingMethod bindingMethod, BindingScope bindingScope)
 {
     if (regexString == null)
     {
         regexString = stepDefinitionRegexCalculator.CalculateRegexFromMethod(type, bindingMethod);
     }
     return(new StepDefinitionBinding(type, regexString, bindingMethod, bindingScope));
 }
        public IStepDefinitionMatchExpression CreateExpression(string expressionString, StepDefinitionType type, IBindingMethod bindingMethod)
        {
            if (expressionString == null || !IsCucumberExpression(expressionString))
            {
                if (expressionString == null)
                {
                    expressionString = _stepDefinitionRegexCalculator.CalculateRegexFromMethod(type, bindingMethod);
                }

                return(new RegexExpression(expressionString));
            }

            return(new CucumberExpression(expressionString, _cucumberExpressionParameterTypeRegistry));
        }