org.jbehave.core.steps
Class StepCandidate

java.lang.Object
  extended by org.jbehave.core.steps.StepCandidate

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.


Nested Class Summary
static class StepCandidate.StartingWordNotFound
           
 
Constructor Summary
StepCandidate(String patternAsString, int priority, StepType stepType, Method method, Object stepsInstance, Map<StepType,String> startingWordsByType, StepPatternParser stepPatternParser, ParameterConverters parameterConverters)
           
 
Method Summary
 void composedOf(String[] steps)
           
 List<Step> createComposedSteps(String stepAsString, Map<String,String> namedParameters, List<StepCandidate> allCandidates)
           
 Step createMatchedStep(String stepAsString, Map<String,String> namedParameters)
           
 void doDryRun(boolean dryRun)
           
 Method getMethod()
           
 String getPatternAsString()
           
 Integer getPriority()
           
 String getStartingWord()
           
 Object getStepsInstance()
           
 StepType getStepType()
           
 boolean ignore(String stepAsString)
           
 boolean isAndStep(String stepAsString)
           
 boolean isComposite()
           
 boolean isPending()
           
 boolean matches(String stepAsString)
           
 boolean matches(String step, String previousNonAndStep)
           
 String toString()
           
 void useParanamer(com.thoughtworks.paranamer.Paranamer paranamer)
           
 void useStepMonitor(StepMonitor stepMonitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StepCandidate

public StepCandidate(String patternAsString,
                     int priority,
                     StepType stepType,
                     Method method,
                     Object stepsInstance,
                     Map<StepType,String> startingWordsByType,
                     StepPatternParser stepPatternParser,
                     ParameterConverters parameterConverters)
Method Detail

getMethod

public Method getMethod()

getPriority

public Integer getPriority()

getPatternAsString

public String getPatternAsString()

getStepsInstance

public Object getStepsInstance()

getStepType

public StepType getStepType()

getStartingWord

public String getStartingWord()

useStepMonitor

public void useStepMonitor(StepMonitor stepMonitor)

doDryRun

public void doDryRun(boolean dryRun)

useParanamer

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

composedOf

public void composedOf(String[] steps)

isComposite

public boolean isComposite()

ignore

public boolean ignore(String stepAsString)

isPending

public boolean isPending()

matches

public boolean matches(String stepAsString)

matches

public boolean matches(String step,
                       String previousNonAndStep)

isAndStep

public boolean isAndStep(String stepAsString)

createMatchedStep

public Step createMatchedStep(String stepAsString,
                              Map<String,String> namedParameters)

createComposedSteps

public List<Step> createComposedSteps(String stepAsString,
                                      Map<String,String> namedParameters,
                                      List<StepCandidate> allCandidates)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2011. All Rights Reserved.