StoryReporter forces me to write non thread safe code
-----------------------------------------------------
Key: JBEHAVE-549
URL: https://jira.codehaus.org/browse/JBEHAVE-549
Project: JBehave
Issue Type: Improvement
Components: Core
Affects Versions: 3.4.5
Reporter: Lance
The StoryBuilder interface includes the following methods
void beforeStory(Story story, boolean givenStory);
void beforeScenario(String scenarioTitle);
void beforeExamples(List<String> steps, ExamplesTable table);
Which forces me to store the story and scenario in local variables in order to
know exactly which examples are about to be run in my beforeExamples method.
This results in a slightly ugly but definately not thread safe StoryBuilder
implementation. It also forces me to implement beforeStory() and
beforeScenario() when I was actually only interested in beforeExamples()
If the methods were:
void beforeStory(Story story, boolean givenStory);
void beforeScenario(Story story, boolean givenStory, String scenarioTitle);
void beforeExamples(Story story, boolean givenStory, String scenarioTitle,
List<String> steps, ExamplesTable table);
I would not need to keep track of the current state and my implementation could
be Thread safe (and prettier).
--
This message is automatically generated by JIRA.
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