JUnitStory.java

  1. package org.jbehave.core.junit;

  2. import static java.util.Arrays.asList;

  3. import java.util.List;

  4. import org.jbehave.core.io.StoryPathResolver;

  5. /**
  6.  * <p>
  7.  * JUnit-runnable entry-point to run a single story using the configured {@link StoryPathResolver}
  8.  * to resolve the story path from the instance class name.
  9.  * </p>
  10.  */
  11. public abstract class JUnitStory extends JUnitStories {

  12.     @Override
  13.     public List<String> storyPaths() {
  14.         StoryPathResolver pathResolver = configuredEmbedder().configuration().storyPathResolver();
  15.         String storyPath = pathResolver.resolve(this.getClass());
  16.         return asList(storyPath);
  17.     }

  18. }