use of org.jbehave.core.embedder.StoryManager.RunningStory in project jbehave-core by jbehave.
the class StoryManagerBehaviour method shouldEnsureStoryReportOutputDirectoryExistsWhenWritingStoryDurations.
@Test
public void shouldEnsureStoryReportOutputDirectoryExistsWhenWritingStoryDurations() throws IOException {
Configuration configuration = new MostUsefulConfiguration();
configuration.storyReporterBuilder().withRelativeDirectory("inexistent");
File outputDirectory = configuration.storyReporterBuilder().outputDirectory();
FileUtils.deleteDirectory(outputDirectory);
assertThat(outputDirectory.exists(), is(false));
StoryManager manager = new StoryManager(configuration, stepsFactory, embedderControls, embedderMonitor, executorService, performableTree);
Collection<RunningStory> runningStories = new ArrayList<>();
manager.writeStoryDurations(runningStories);
assertThat(outputDirectory.exists(), is(true));
}
Aggregations