Пример #1
0
 public StepCandidate(
     String patternAsString,
     int priority,
     StepType stepType,
     Method method,
     Class<?> stepsType,
     InjectableStepsFactory stepsFactory,
     StepsContext stepsContext,
     Keywords keywords,
     StepPatternParser stepPatternParser,
     ParameterConverters parameterConverters,
     ParameterControls parameterControls) {
   this.patternAsString = patternAsString;
   this.priority = priority;
   this.stepType = stepType;
   this.method = method;
   this.stepsType = stepsType;
   this.stepsFactory = stepsFactory;
   this.keywords = keywords;
   this.stepMatcher = stepPatternParser.parseStep(stepType, patternAsString);
   this.stepCreator =
       new StepCreator(
           stepsType,
           stepsFactory,
           stepsContext,
           parameterConverters,
           parameterControls,
           stepMatcher,
           stepMonitor);
 }
    @Override
    public boolean processStepDefinition(StepDefinitionAnnotation stepDefinitionAnnotation) {
      StepMatcher stepMatcher =
          stepPatternParser.parseStep(stepType, stepDefinitionAnnotation.getAnnotationText());

      if (stepMatcher.matches(stepText)) {
        matchingAnnotation = stepDefinitionAnnotation;

        return false;
      }
      return true;
    }