@BeforeScenario executes before each scenario.
|@BeforeScenario||(uponType=ScenarioType.EXAMPLE) executes before each
example in a scenario.
|
The
org/jbehave/examples/trader/stories/trader_is_alerted_of_status.story
show this in action.
On 21/09/2012 10:45, Roy de Kleijn wrote:
|This one doesn't work:
@BeforeScenario|
|public| |void| |beforeEachScenario() {|
|||// ...|
|}
This one is working for scenarios with examples, but not for scenarios
without examples.
|
|@BeforeScenario||(uponType=ScenarioType.EXAMPLE)|
|public| |void| |beforeEachExampleScenario() {|
|||// ...|
|}
Do I something wrong? or how can I get it work for both cases?
|
------------------------------------------------------------------------
*Van:* Roy de Kleijn [[email protected]]
*Verzonden:* vrijdag 21 september 2012 11:21
*Aan:* [email protected]
*Onderwerp:* RE: [jbehave-user] beforestory doesn't run if I specify
examples
I mean the code in the beforeScenario is not being executed..
------------------------------------------------------------------------
*Van:* Mauro Talevi [[email protected]]
*Verzonden:* vrijdag 21 september 2012 11:16
*Aan:* [email protected]
*Onderwerp:* Re: [jbehave-user] beforestory doesn't run if I specify
examples
What do you mean by "beforestory doesn't run"?
On 21/09/2012 10:15, Roy de Kleijn wrote:
Hi,
Is it true that we can't use beforestory if we like to specify Examples?
In my case it isn't executed, only if I remove the examples.
Thanks,
Roy