Package org.jbehave.core.steps
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 withGiven
,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 theStepMatcher
and for the creation of the matched executable step via theStepCreator
. The name of a StepCandidate is the combination of its starting word and its pattern.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME_FORMAT
-
Constructor Summary
Constructors Constructor Description StepCandidate(String patternAsString, int priority, StepType stepType, Method method, Class<?> stepsType, InjectableStepsFactory stepsFactory, Keywords keywords, StepMatcher stepMatcher, String parameterPrefixString, StepCreator stepCreator)
StepCandidate(String patternAsString, int priority, StepType stepType, Method method, Class<?> stepsType, InjectableStepsFactory stepsFactory, StepsContext stepsContext, Keywords keywords, StepPatternParser stepPatternParser, ParameterConverters parameterConverters, ParameterControls parameterControls)
-
Method Summary
-
-
-
Field Detail
-
NAME_FORMAT
public static final String NAME_FORMAT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StepCandidate
public StepCandidate(String patternAsString, int priority, StepType stepType, Method method, Class<?> stepsType, InjectableStepsFactory stepsFactory, StepsContext stepsContext, Keywords keywords, StepPatternParser stepPatternParser, ParameterConverters parameterConverters, ParameterControls parameterControls)
-
StepCandidate
public StepCandidate(String patternAsString, int priority, StepType stepType, Method method, Class<?> stepsType, InjectableStepsFactory stepsFactory, Keywords keywords, StepMatcher stepMatcher, String parameterPrefixString, StepCreator stepCreator)
-
-
Method Detail
-
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)
-
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()
-
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)
-
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)
-
getStepCreator
protected StepCreator getStepCreator()
-
getKeywords
protected Keywords getKeywords()
-
getStepMatcher
protected StepMatcher getStepMatcher()
-
getStepMonitor
protected StepMonitor getStepMonitor()
-
-