Re: [jbehave-user] Using @UsingSteps for step classes with parameter constructor

2011-12-23 Thread Alexander Lehmann
I am more or less using the example for page objects from http://jbehave.org/reference/web/stable/using-selenium.html, which uses step constructors with a parameter, I guess I'll look into using DI to replace that. On Fri, Dec 23, 2011 at 12:27 AM, Cristiano Gavião wrote: > Hi, > > Don't know if

Re: [jbehave-user] Using @UsingSteps for step classes with parameter constructor

2011-12-22 Thread Mauro Talevi
If you want to inject dependencies, you can do it via one of the DI frameworks and the corresponding annotations, @UsingGuice/Pico/Spring/Weld. @UsingSteps is only used for instances that are default constructors. On 22/12/2011 23:26, Alexander Lehmann wrote: I have started using AnnotatedPathR

Re: [jbehave-user] Using @UsingSteps for step classes with parameter constructor

2011-12-22 Thread Cristiano Gavião
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 Gu

[jbehave-user] Using @UsingSteps for step classes with parameter constructor

2011-12-22 Thread Alexander Lehmann
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