org.jbehave.scenario.steps
Class Steps

java.lang.Object
  extended by org.jbehave.scenario.steps.Steps

public class Steps
extends java.lang.Object

Extend this class to provide the definition of steps that match the scenario you want to run.

You can define the methods that should be run when each step is performed by annotating them with @Given, @When or @Then, and providing a value for each annotation that matches the step. By default, the match is performed using a '$' prefix to pick up parameters.

For instance, you could define a method as:


Constructor Summary
Steps()
          Creates Steps with all default dependencies
Steps(StepPatternBuilder patternBuilder, StepMonitor stepMonitor, ParameterConverters parameterConverters, java.lang.String... startingWords)
          Creates Steps with all custom dependencies
Steps(java.lang.String... startingWords)
          Creates Steps with all default dependencies except for custom starting keywords
 
Method Summary
 CandidateStep[] getSteps()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Steps

public Steps()
Creates Steps with all default dependencies


Steps

public Steps(java.lang.String... startingWords)
Creates Steps with all default dependencies except for custom starting keywords

Parameters:
startingWords - the words with which we expect steps in the scenarios to start

Steps

public Steps(StepPatternBuilder patternBuilder,
             StepMonitor stepMonitor,
             ParameterConverters parameterConverters,
             java.lang.String... startingWords)
Creates Steps with all custom dependencies

Parameters:
patternBuilder - how we build patterns from annotations which will match the steps in the scenarios
stepMonitor - how we monitor the matching of the patterns
parameterConverters - how we convert parameters from Strings to other objects
startingWords - the words with which we expect steps in the scenarios to start
Method Detail

getSteps

public CandidateStep[] getSteps()
Returns:
all the steps that can be performed by this class


Copyright © 2003-2008. All Rights Reserved.