public void CanMatchStepsAndStuff() { var step = Step.Given("i am logged in as an administrator"); var method = new ActionStepMethod(null, new GivenAttribute("i am logged in as an administrator")); Assert.IsTrue(matcher.GetMatch(step, method).IsMatch); }
List <FoundMatch> MatchStepsToActionMethods(IEnumerable <Step> steps, IEnumerable <ActionStepsClass> actionStepsClasses, StepMatcher matcher) { return((from step in steps from actionStepClass in actionStepsClasses let requiredType = actionStepClass.Type from actionStepMethod in actionStepClass.ActionStepMethods let match = matcher.GetMatch(step, actionStepMethod) where match.IsMatch select new FoundMatch { RequiredType = requiredType, ActionStepMethod = actionStepMethod, StepMatch = match, }) .ToList()); }