Hi,
Don't know if using a Step class constructor with parameter would be a
good practice...
If you have the need to access objects inside you Step class try to
improve your tests with the power of some DI to inject all desired
object (including you page objects). Jbehave let you work with Guice,
Pico and Spring. There are examples for each one.
cheers
Cristiano
On 22/12/11 19:26, Alexander Lehmann wrote:
I have started using AnnotatedPathRunner to run stories as Junit in
eclipse, based on the TraderAnnotatedPathRunner example.
This works well for Step classes that do not have parameters in the
constructor by listing the classes in the @UsingSteps annotation.
I have no idea, however, how this should work with steps classes that
require a constructor with parameters (e.g. steps using page objects).
As I understand this is usually done by implementing an
InjectableStepsFactory, but I have no idea where to put that in the
annotation version.
bye, Alexander
---------------------------------------------------------------------
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