public ALMViewGenerator() { this(new UnderscoredToCapitalized()); }
/** * Retrieves the location of the stories. <br> * This method is intended to be overwritten on divergent location for stories * than src/test/resources * * @return location of the stories to look for. */ protected URL getStoryLocation() { return codeLocationFromPath("src/test/resources"); }
public List<String> findResources() { return new StoryFinder().findPaths(codeLocation, include, exclude); }
@Override protected List<String> storyPaths() { return new StoryFinder().findPaths( codeLocationFromClass(this.getClass()), "**/*.story", "**/failing_before*.story"); }
protected Map<String, Resource> createIndexFromPaths(String rootURI, String rootPath, String syntax, String includes) { Map<String, Resource> index = new HashMap<>(); List<String> paths = new StoryFinder().findPaths( codeLocationFromPath(rootPath), includes, EMPTY); for (String path : paths) { addPath(rootURI, rootPath, fullPath(rootPath, path), syntax, index); } return index; }
/** * Finds story paths, using the {@link #newStoryFinder()}, in the * {@link #searchDirectory()} given specified {@link #includes} and * {@link #excludes}. * * @return A List of story paths found */ protected List<String> storyPaths() { log("Searching for story paths including " + includes + " and excluding " + excludes, MSG_DEBUG); List<String> storyPaths = newStoryFinder().findPaths(searchDirectory(), includes, excludes); log("Found story paths: " + storyPaths, MSG_INFO); return storyPaths; }
private String loadResource(String uri) { try { return loader.loadResourceAsText(uri); } catch (Exception e) { return e.getMessage(); } }
/** * Finds class names, using the {@link #newStoryFinder()}, in the * {@link #searchDirectory()} given specified {@link #includes} and * {@link #excludes}. * * @return A List of class names found */ protected List<String> classNames() { getLog().debug("Searching for class names including " + includes + " and excluding " + excludes); List<String> classNames = newStoryFinder().findClassNames(searchDirectory(), includes, excludes); getLog().info("Found class names: " + classNames); return classNames; }
@Override protected String resolveName( final Class<? extends Embeddable> embeddableClass) { String resolveName = super.resolveName(embeddableClass); int lastIndex = resolveName.length() - STORY_NAME_ENDING; return resolveName.substring(0, lastIndex); } }
public String resolveName(StoryLocation storyLocation, String extension) { String name = storyLocation.getPath(); if (StringUtils.contains(name, File.separator)) { name = StringUtils.substringAfterLast(name, File.separator); } return StringUtils.substringBeforeLast(name, ".") + "." + extension; } }
@Override protected List<String> storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/stories/*.story", ""); }
/** * Retrieves the location of the stories. */ protected List<String> storyPaths() { return new StoryFinder().findPaths(getStoryLocation(), "**/*.story", ""); }
public GroovyResourceFinder(){ this(CodeLocations.codeLocationFromPath("src/main/groovy"), "**/*.groovy", ""); }
private String resourceContent(String uri) { try { return loader.loadResourceAsText(uri); } catch (Exception e) { return e.getMessage(); } }
/** * Finds class names, using the {@link #newStoryFinder()}, in the * {@link #searchDirectory()} given specified {@link #includes} and * {@link #excludes}. * * @return A List of class names found */ protected List<String> classNames() { log("Searching for class names including " + includes + " and excluding " + excludes, MSG_DEBUG); List<String> classNames = newStoryFinder().findClassNames(searchDirectory(), includes, excludes); log("Found class names : " + classNames, MSG_INFO); return classNames; }
@Override protected List<String> storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "**/failing_before*.story"); }
@Override public List<String> storyPaths() { return new StoryFinder().findPaths(getStoryLocation(), JBehaveConstants.STORY_PATTERN, JBehaveConstants.NO_EXCLUDE); }
protected URL getStoryLocation() { return codeLocationFromPath(JBehaveConstants.DEFAULT_STORY_LOCATION); }
@Override protected List<String> storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(), asList("**/" + System.getProperty("storyFilter", "*") + ".story"), null); }
protected List<String> storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(), asList("**/" + System.getProperty("storyFilter", "*") + ".story"), null); } }