Got it! I reviewed the "parametrised.story" in the Trader JBehave
example for the answer. It would nice if the JBehave documentation
expressed this information. Here's how it is working right now (sans
code clean-up):
root.story
Scenario: description
GivenStories: scripts/requirement1.story#{0},
scripts/requirement1.story#{1}
<a token Given/When/Then steps. JBehave does not appear to process
this file unless those steps are in here. Requires more investigation.>
Examples:
|protocol|
|http |
|jms |
requirement1.story
Scenario: description
Given I use <protocol>
When ...
Steps.java
@Given("I use <protocol>")
public void iUse(@Named("protocol") String protocol) {
// this code is called twice. Once where "protocol=http", and once
where "protocol=jms"
}
While I'm still not entirely comfortable with expressing transport
protocols in my behaviors, this solution avoids duplicating stories for
each new protocol.
Thanx for your help Mauro.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email