コード例 #1
0
 private void addComposedStepsRecursively(
     List<Step> steps,
     String stepAsString,
     Map<String, String> namedParameters,
     List<StepCandidate> allCandidates,
     String[] composedSteps) {
   Map<String, String> matchedParameters =
       stepCreator.matchedParameters(
           method, stepAsString, stripStartingWord(stepAsString), namedParameters);
   matchedParameters.putAll(namedParameters);
   for (String composedStep : composedSteps) {
     addComposedStep(steps, composedStep, matchedParameters, allCandidates);
   }
 }
コード例 #2
0
 private void addComposedStep(
     List<Step> steps,
     String composedStep,
     Map<String, String> matchedParameters,
     List<StepCandidate> allCandidates) {
   StepCandidate candidate = findComposedCandidate(composedStep, allCandidates);
   if (candidate != null) {
     steps.add(candidate.createMatchedStep(composedStep, matchedParameters));
     if (candidate.isComposite()) {
       // candidate is itself composite: recursively add composed steps
       addComposedStepsRecursively(
           steps, composedStep, matchedParameters, allCandidates, candidate.composedSteps());
     }
   } else {
     steps.add(StepCreator.createPendingStep(composedStep, null));
   }
 }
コード例 #3
0
 public Step createMatchedStepUponOutcome(
     String stepAsString, Map<String, String> namedParameters, Outcome outcome) {
   return stepCreator.createParametrisedStepUponOutcome(
       method, stepAsString, stripStartingWord(stepAsString), namedParameters, outcome);
 }
コード例 #4
0
 public Step createMatchedStep(String stepAsString, Map<String, String> namedParameters) {
   return stepCreator.createParametrisedStep(
       method, stepAsString, stripStartingWord(stepAsString), namedParameters);
 }