Package org.jbehave.core.steps
Class StepCandidate
- java.lang.Object
-
- org.jbehave.core.steps.StepCandidate
-
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, StepsContext stepsContext, Keywords keywords, StepPatternParser stepPatternParser, ParameterConverters parameterConverters, ParameterControls parameterControls)
-
Method Summary
Modifier and Type Method Description void
addComposedSteps(List<Step> steps, String stepAsString, Map<String,String> namedParameters, List<StepCandidate> allCandidates)
boolean
comment(String stepAsString)
void
composedOf(String[] steps)
String[]
composedSteps()
Step
createMatchedStep(String stepAsString, Map<String,String> namedParameters, List<Step> composedSteps)
Step
createMatchedStepUponOutcome(String stepAsString, Map<String,String> namedParameters, List<Step> composedSteps, AfterScenario.Outcome outcome)
void
doDryRun(boolean dryRun)
Method
getMethod()
String
getName()
String
getPatternAsString()
Integer
getPriority()
String
getStartingWord()
Object
getStepsInstance()
Class<?>
getStepsType()
StepType
getStepType()
boolean
ignore(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)
-
-
-
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)
-
-
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()
-
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)
-
-