2009/11/12 Mauro Talevi <[email protected]>

> nino martinez wael wrote:
>
>> Hi
>>
>> Are there any examples on givenscenarios (
>> http://jira.codehaus.org/browse/JBEHAVE-126).
>>
>>
>
> https://svn.codehaus.org/jbehave/trunk/core/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/trader_sells_all_stocks.scenario


thanks for the link, I think it should be added to the wiki..

>
>
>  We are using the UnderscoredCamelCaseResolver and PatternScenarioParser,
>> but im not sure what to put in path to scenarios and what the scenario
>> should be called. Are it supposed to be the name of the .scenario file or?
>>
>
> The extension is completely configurable and up to the use to choose what
> they prefer.  In the trader examples, the extension ".scenario" is used:
>
>
> https://svn.codehaus.org/jbehave/trunk/core/examples/trader/src/main/java/org/jbehave/examples/trader/TraderScenario.java



>
>
>  Also the usecase we have would be to try to factor out common beginings of
>> scenarios. But the begining scenario itself might not be able to pass the
>> test what should be done there.. And finally are the scenarion steps/text
>> just suffixed at the scenario using the given keyword, that would hit the
>> spot for us.
>>
>
> Sorry, don't really understand your use case.  Could you provide an
> example?
>

Hmm yeah I guess we should always be able todo something like
Scenario:login
When a user wants to log in
Then a user logs in

So if I have the above scenario and this one:
Scenario:buy a product
GivenScenarios: login
When a user clicks buy product
Then a user buys the product

Then the login scenario will be run in the same context as the buy a product
scenario right? Otherwise the user will get an not authorized error since he
are not logged in...


> Cheers
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to