|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbehave.core.io.LoadFromRelativeFile
public class LoadFromRelativeFile
Loads story resources from relative file paths that are
traversal to a given location.
StoryLoader loader = new
LoadFromRelativeFile(codeLocationFromClass(YourStory.class));
By default, it uses traversal directory
'target/test-classes' with source dir in 'src/test/java'.
Other traversal locations can be specified via the varargs constructor:
StoryLoader loader = new
LoadFromRelativeFile(codeLocationFromClass(YourStory.class),
mavenModuleTestStoryFilePath("src/test/java"),
intellijProjectTestStoryFilePath("src/test/java"));
Convenience methods : mavenModuleStoryFilePath(java.lang.String),
mavenModuleTestStoryFilePath(java.lang.String)
intellijProjectStoryFilePath(java.lang.String)
intellijProjectTestStoryFilePath(java.lang.String)
CodeLocations#codeLocationFromClass(Class)}| Nested Class Summary | |
|---|---|
static class |
LoadFromRelativeFile.StoryFilePath
For use the the varargs constructor of LoadFromRelativeFile, to
allow a range of possibilities for locating Story file paths |
| Constructor Summary | |
|---|---|
LoadFromRelativeFile(URL location)
|
|
LoadFromRelativeFile(URL location,
LoadFromRelativeFile.StoryFilePath... traversals)
|
|
| Method Summary | |
|---|---|
static LoadFromRelativeFile.StoryFilePath |
intellijProjectStoryFilePath(String relativePath)
Intellij by default, has its PRODUCTION classes in classes/production. |
static LoadFromRelativeFile.StoryFilePath |
intellijProjectTestStoryFilePath(String relativePath)
Intellij by default, has its TEST classes in classes/test. |
protected String |
loadContent(String path)
|
String |
loadResourceAsText(String resourcePath)
|
String |
loadStoryAsText(String storyPath)
|
static LoadFromRelativeFile.StoryFilePath |
mavenModuleStoryFilePath(String relativePath)
Maven by default, has its PRODUCTION classes in target/classes. |
static LoadFromRelativeFile.StoryFilePath |
mavenModuleTestStoryFilePath(String relativePath)
Maven by default, has its TEST classes in target/test-classes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoadFromRelativeFile(URL location)
public LoadFromRelativeFile(URL location,
LoadFromRelativeFile.StoryFilePath... traversals)
| Method Detail |
|---|
public String loadResourceAsText(String resourcePath)
loadResourceAsText in interface ResourceLoaderpublic String loadStoryAsText(String storyPath)
loadStoryAsText in interface StoryLoaderprotected String loadContent(String path)
public static LoadFromRelativeFile.StoryFilePath mavenModuleStoryFilePath(String relativePath)
relativePath - the path to the stories' base-dir inside the module
public static LoadFromRelativeFile.StoryFilePath mavenModuleTestStoryFilePath(String relativePath)
relativePath - the path to the stories' base-dir inside the module
public static LoadFromRelativeFile.StoryFilePath intellijProjectStoryFilePath(String relativePath)
relativePath - the path to the stories' base-dir inside the module
public static LoadFromRelativeFile.StoryFilePath intellijProjectTestStoryFilePath(String relativePath)
relativePath - the path to the stories' base-dir inside the module
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||