[
http://jira.codehaus.org/browse/JBEHAVE-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225879#action_225879
]
Mauro Talevi commented on JBEHAVE-264:
--------------------------------------
Hi Bruno, I've added the functionality to AbstractStepsFactory so it's
available to all impls of InjectableStepsFactory, whichever way the steps
instances are created. For the moment only the method annotation has been
implemented, and not the class annotation. Class-annotated configuration is
being addressed by JBEHAVE-265.
Thanks for you very good suggestions!
> Steps methods as parameter converters when annotated by @AsParameterConverter
> -----------------------------------------------------------------------------
>
> Key: JBEHAVE-264
> URL: http://jira.codehaus.org/browse/JBEHAVE-264
> Project: JBehave
> Issue Type: Improvement
> Components: Core
> Reporter: Bruno Bieth
> Fix For: 3.0
>
> Attachments: ParameterConverters.java,
> ParameterConverterStepsFactory.java
>
>
> Better starting with an example :
> {code}
> Given a series
> - Name : Series 0110
> - NAV : $200
> Given an investor Peter
> When Peter invests 7500 shares in series Series 0110
> Then ...
> {code}
> It would be interesting to have the Steps definition class also able to
> provide some converters. This is what the code could look like :
> {code}
> @AsParameterConverter
> public Person findByFirstName( String firstName ) {
> return personDao.findByFirstName( firstName );
> }
> @When("$person invests $nbShares shares in series $series" )
> public void invest(Person person, int nbShares, Series series ) {
> }
> {code}
> I've attached the ParameterConverterStepsFactory as it's getting bigger.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email