Configuration is currently split between embedder and steps. I most 
implementation it is likely that steps need some general configuration… in my 
case I am loading some default values from properties files, etc… it would be 
nice to centralize all environment configuration in the embedder since it 
already has the concept of configurable properties… and provide a way to access 
it from the steps classes.




From: Mauro Talevi [mailto:[email protected]]
Sent: Thursday, June 27, 2013 6:26 PM
To: [email protected]
Subject: Re: [jbehave-user] how to access AnnotatedPathRunner instance from 
steps class

In other words, there is an Inversion of Control between the runner and the 
steps classes.  The steps classes are agnostic of the runner.

Why do you feel the need to have them talk?

On 27 Jun 2013, at 16:23, Cristiano Gavião 
<[email protected]<mailto:[email protected]>> wrote:
there is no preferred or correct way to do that... you can't...

AnnotatedPathRunner was created to setup the Embedder that will run your 
stories...
the configuration of your environment (the system under test) should be done in 
your steps classes...

2013/6/27 Luigi Suardi <[email protected]<mailto:[email protected]>>
I am using AnnotatedPathRunner based configuration together with a standalone 
POJO step class.

I would like to initialize all my environment configuration in the 
AnnotatedPathRunner and then access it from the steps class.

What is the preferred/correct way to access the AnnotatedPathRunner from the 
steps classes?

Thank you!
Luigi





--
"Tudo vale a pena se a alma não é pequena..."

Reply via email to