StoryReporter forces me to write non thread safe code

Description

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).

Assignee

Unassigned

Reporter

Lance

Labels

None

Components

Affects versions

Priority

Major
Configure