1 | |
package org.jbehave.core.reporters; |
2 | |
|
3 | |
import org.jbehave.core.context.Context; |
4 | |
import org.jbehave.core.model.Story; |
5 | |
|
6 | |
public class ContextStoryReporter extends NullStoryReporter { |
7 | |
private final Context context; |
8 | |
|
9 | 0 | public ContextStoryReporter(Context context) { |
10 | 0 | this.context = context; |
11 | 0 | } |
12 | |
|
13 | |
@Override |
14 | |
public void beforeStory(Story story, boolean givenStory) { |
15 | 0 | context.setCurrentStory(story.getPath()); |
16 | 0 | } |
17 | |
|
18 | |
@Override |
19 | |
public void beforeScenario(String title) { |
20 | 0 | context.setCurrentScenario(title); |
21 | 0 | } |
22 | |
} |