コード例 #1
0
ファイル: StoryRunner.java プロジェクト: kolman/jbehave-core
 private void runGivenStories(
     GivenStories givenStories, Map<String, String> parameters, RunContext context)
     throws Throwable {
   if (givenStories.getPaths().size() > 0) {
     reporter.get().givenStories(givenStories);
     for (GivenStory givenStory : givenStories.getStories()) {
       RunContext childContext = context.childContextFor(givenStory);
       // run given story, using any parameters provided
       Story story = storyOfPath(context.configuration(), childContext.path());
       if (givenStory.hasAnchorParameters()) {
         story = storyWithMatchingScenarios(story, givenStory.getAnchorParameters());
       }
       parameters.putAll(givenStory.getParameters());
       run(childContext, story, parameters);
     }
   }
 }