Package org.jbehave.core.steps
Class StepCandidate
java.lang.Object
org.jbehave.core.steps.StepCandidate
- Direct Known Subclasses:
ConditionalStepCandidate
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 Summary
-
Constructor Summary
ConstructorDescriptionStepCandidate
(String patternAsString, int priority, StepType stepType, Method method, Class<?> stepsType, InjectableStepsFactory stepsFactory, Keywords keywords, StepMatcher stepMatcher, String parameterPrefixString, StepCreator stepCreator, String[] steps, StepMonitor stepMonitor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComposedSteps
(List<Step> steps, String stepAsString, Map<String, String> namedParameters, List<StepCandidate> allCandidates) boolean
String[]
createMatchedStep
(String stepAsString, Map<String, String> namedParameters, List<Step> composedSteps) createMatchedStepUponOutcome
(String stepAsString, Map<String, String> namedParameters, List<Step> composedSteps, AfterScenario.Outcome outcome) protected Keywords
getName()
protected StepCreator
protected StepMatcher
protected StepMonitor
Class<?>
boolean
boolean
boolean
boolean
boolean
protected String
stripStartingWord
(String stepAsString) toString()
void
useParanamer
(com.thoughtworks.paranamer.Paranamer paranamer) void
useStepMonitor
(StepMonitor stepMonitor)
-
Field Details
-
NAME_FORMAT
- See Also:
-
-
Constructor Details
-
StepCandidate
public StepCandidate(String patternAsString, int priority, StepType stepType, Method method, Class<?> stepsType, InjectableStepsFactory stepsFactory, Keywords keywords, StepMatcher stepMatcher, String parameterPrefixString, StepCreator stepCreator, String[] steps, StepMonitor stepMonitor)
-
-
Method Details
-
getMethod
-
getName
-
getPriority
-
getPatternAsString
-
getStepsInstance
-
getStepsType
-
getStepType
-
getStartingWord
-
getParameterPrefix
-
useStepMonitor
-
useParanamer
public void useParanamer(com.thoughtworks.paranamer.Paranamer paranamer) -
isComposite
public boolean isComposite() -
composedSteps
-
ignore
-
comment
-
isPending
public boolean isPending() -
matches
-
matches
-
createMatchedStep
-
createMatchedStepUponOutcome
-
addComposedSteps
-
stripStartingWord
-
getStepCreator
-
getKeywords
-
getStepMatcher
-
getStepMonitor
-
toString
-