>From my understanding there is no mechanism within JBehave that offers
this. What I have done previously is add a global Map within the Steps
class that keeps these in memory.

Your Steps class is used for all stories there is no need to have a
1:1 between stories and Java classes.

PS I think a similar question was asked a week or so back.

On Mon, Mar 21, 2011 at 7:41 AM, Paul Hammant <[email protected]> wrote:
> Could you give us an example of a scenario ?
> - Paul
>
> On Sun, Mar 20, 2011 at 4:20 PM, Evgeny Dzhurinsky <[email protected]>
> wrote:
>>
>> Hello!
>>
>> Can you please explain, is it possible to use method, annotated with
>> @Given keyword, in order to create and return certain object? I want
>> to create several common classes for @Given (create instance of server
>> for example) and then pass it to other methods, annotated with @When
>> and @Then as a parameter?
>>
>> The overall idea is to have set of common classes to be combined into
>> test story rather then create test class per story.
>>
>> --
>> regards
>> Eugene Dzhurinsky
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to