Class StepCandidate

java.lang.Object
org.jbehave.core.steps.StepCandidate
Direct Known Subclasses:
ConditionalStepCandidate

public class StepCandidate extends Object
A StepCandidate is associated to a Java method annotated with Given, When, Then in a steps instance class. The StepCandidate is responsible for matching the textual step against the pattern contained in the method annotation via the StepMatcher and for the creation of the matched executable step via the StepCreator. The name of a StepCandidate is the combination of its starting word and its pattern.
  • Field Details

  • Constructor Details

  • Method Details

    • getMethod

      public Method getMethod()
    • getName

      public String getName()
    • getPriority

      public Integer getPriority()
    • getPatternAsString

      public String getPatternAsString()
    • getStepsInstance

      public Object getStepsInstance()
    • getStepsType

      public Class<?> getStepsType()
    • getStepType

      public StepType getStepType()
    • getStartingWord

      public String getStartingWord()
    • getParameterPrefix

      public String getParameterPrefix()
    • useStepMonitor

      public void useStepMonitor(StepMonitor stepMonitor)
    • useParanamer

      public void useParanamer(com.thoughtworks.paranamer.Paranamer paranamer)
    • isComposite

      public boolean isComposite()
    • composedSteps

      public String[] composedSteps()
    • ignore

      public boolean ignore(String stepAsString)
    • comment

      public boolean comment(String stepAsString)
    • isPending

      public boolean isPending()
    • matches

      public boolean matches(String stepAsString)
    • matches

      public boolean matches(String step, String previousNonAndStep)
    • createMatchedStep

      public Step createMatchedStep(String stepAsString, Map<String,String> namedParameters, List<Step> composedSteps)
    • createMatchedStepUponOutcome

      public Step createMatchedStepUponOutcome(String stepAsString, Map<String,String> namedParameters, List<Step> composedSteps, AfterScenario.Outcome outcome)
    • addComposedSteps

      public void addComposedSteps(List<Step> steps, String stepAsString, Map<String,String> namedParameters, List<StepCandidate> allCandidates)
    • stripStartingWord

      protected String stripStartingWord(String stepAsString)
    • getStepCreator

      protected StepCreator getStepCreator()
    • getKeywords

      protected Keywords getKeywords()
    • getStepMatcher

      protected StepMatcher getStepMatcher()
    • getStepMonitor

      protected StepMonitor getStepMonitor()
    • toString

      public String toString()
      Overrides:
      toString in class Object