Hi,
first of all thanks for the contribution of the prototype and the
suggestion of the new feature.
Here are some initial comments:
- if I can resume your goal, it'd be to provide a context map - scoped
at scenario or story level - via which to share objects in the
implementations of the steps.
- as such it's not something that is necessarily tied to feature of
Guice, although DI containers may support in different ways.
Now, taking a step back, would it be conceptually equivalent to defining
a context map object (which different keys for different scopes) and
simply declaring it and having it available in the DI containers?
In this case, it could be in principle supported entirely by the user
configuration (albeit using some common context classes).
I'd like to understand better the use case that's driving this requirement.
Thanks
On 31/05/2013 21:22, Sebastian Sickelmann wrote:
Hi,
i created a prototype for two Guice-Injection-Scopes that are based on
the JBehave Lifecycle.
If you are interested you can look at the commits at my github-repo
(branch GuiceScenarioScope)
https://github.com/picpromusic/jbehave-core/commits/GuiceScenarioScope.
You can find examples here
https://github.com/picpromusic/jbehave-core/blob/GuiceScenarioScope/examples/guice/src/main/java/org/jbehave/examples/core/guice/scope/AnnotatedEmbedderUsingGuiceAndStepsAndScope.java
and here
https://github.com/picpromusic/jbehave-core/blob/GuiceScenarioScope/examples/guice/src/main/java/org/jbehave/examples/core/guice/jb921/JBEHAVE_921.java
There are many ways how this can be implemented in JBehave and
actually i choose to extend the StoryRunner. My actual goal is now to
discuss with the jbehave community if jbehave should support such
Scopes and if yes: How jbehave should support it in a way for the
other injection implementations pico, spring, weld.
For a quick diff-view without fetching my repo see
https://github.com/picpromusic/jbehave-core/compare/master...GuiceScenarioScope
Kind regards
Sebastian
---------------------------------------------------------------------
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