[
http://jira.codehaus.org/browse/JBEHAVE-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bruno Bieth updated JBEHAVE-264:
--------------------------------
Attachment: (was: ParameterConverterStepsFactory.java)
> Steps could act as parameter converters : add the @ParameterConverter
> annotation
> --------------------------------------------------------------------------------
>
> Key: JBEHAVE-264
> URL: http://jira.codehaus.org/browse/JBEHAVE-264
> Project: JBehave
> Issue Type: Improvement
> Reporter: Bruno Bieth
> 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}
> @ParameterConverter
> 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