|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbehave.core.steps.Steps
public class Steps
Default implementation of CandidateSteps which provides the step
candidates that match the steps being run.
To provide your step candidate methods, you can:
Steps class, in which case the instance is the
extended Steps class itself ("is-a" relationship)Steps class implementation.
You can define the methods that should be run by annotating them with
@Given, @When or @Then, and providing
as a value for each annotation a pattern matches the textual step. The value
is interpreted by the StepPatternParser, which by default is a
RegexPrefixCapturingPatternParser that interprets the words starting
with '$' as parameters.
For instance, you could define a method as:
| Nested Class Summary | |
|---|---|
static class |
Steps.DuplicateCandidateFound
|
| Constructor Summary | |
|---|---|
Steps()
Creates Steps with default configuration for a class extending this instance and containing the candidate step methods |
|
Steps(Configuration configuration)
Creates Steps with given custom configuration for a class extending this instance and containing the candidate step methods |
|
Steps(Configuration configuration,
java.lang.Class<?> type,
InjectableStepsFactory stepsFactory)
Creates Steps with given custom configuration and a steps instance type containing the candidate step methods. |
|
Steps(Configuration configuration,
java.lang.Object instance)
Creates Steps with given custom configuration and a steps instance containing the candidate step methods |
|
| Method Summary | |
|---|---|
Configuration |
configuration()
Returns the configuration |
java.lang.Object |
instance()
|
java.util.List<BeforeOrAfterStep> |
listBeforeOrAfterScenario(ScenarioType type)
Returns the before or after scenario steps |
java.util.List<BeforeOrAfterStep> |
listBeforeOrAfterStories()
Returns the before or after stories steps |
java.util.List<BeforeOrAfterStep> |
listBeforeOrAfterStory(boolean givenStory)
Returns the before or after story steps, based on the given story status |
java.util.List<StepCandidate> |
listCandidates()
Returns the step candidates that can be matched |
java.lang.String |
toString()
|
java.lang.Class<?> |
type()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Steps()
public Steps(Configuration configuration)
configuration - the Configuration
public Steps(Configuration configuration,
java.lang.Object instance)
configuration - the Configurationinstance - the steps instance
public Steps(Configuration configuration,
java.lang.Class<?> type,
InjectableStepsFactory stepsFactory)
configuration - the Configurationtype - the steps instance typestepsFactory - the InjectableStepsFactory| Method Detail |
|---|
public java.lang.Class<?> type()
public java.lang.Object instance()
public Configuration configuration()
CandidateSteps
configuration in interface CandidateStepspublic java.util.List<StepCandidate> listCandidates()
CandidateSteps
listCandidates in interface CandidateStepspublic java.util.List<BeforeOrAfterStep> listBeforeOrAfterStories()
CandidateSteps
listBeforeOrAfterStories in interface CandidateStepspublic java.util.List<BeforeOrAfterStep> listBeforeOrAfterStory(boolean givenStory)
CandidateSteps
listBeforeOrAfterStory in interface CandidateStepsgivenStory - the boolean flag denoting if it's a given story
public java.util.List<BeforeOrAfterStep> listBeforeOrAfterScenario(ScenarioType type)
CandidateSteps
listBeforeOrAfterScenario in interface CandidateStepstype - the ScenarioType
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||