Class UnderscoredCamelCaseResolver
- java.lang.Object
-
- org.jbehave.core.io.AbstractStoryPathResolver
-
- org.jbehave.core.io.UnderscoredCamelCaseResolver
-
- All Implemented Interfaces:
StoryPathResolver
public class UnderscoredCamelCaseResolver extends AbstractStoryPathResolver
Resolves story paths converting the camel-cased Java core class to lower-case underscore-separated paths e.g.: "org.jbehave.core.ICanLogin.java" -> "org/jbehave/core/i_can_login.story".
By default, the
AbstractStoryPathResolver.DEFAULT_EXTENSION
is used but this can be configured via the constructor so that we can resolve class to use another or no extension at all, e.g.: "org.jbehave.core.ICanLogin.java" -> "org/jbehave/core/i_can_login".The default resolution pattern
NUMBERS_AS_LOWER_CASE_LETTERS_PATTERN
treats numbers as lower case letters, e.g.: "org.jbehave.core.ICanLoginTo1Site.java" -> "org/jbehave/core/i_can_login_to1_site"Choose
NUMBERS_AS_UPPER_CASE_LETTERS_PATTERN
to treat numbers as upper case letters, e.g.: "org.jbehave.core.ICanLoginTo1Site.java" -> "org/jbehave/core/i_can_login_to_1_site"
-
-
Field Summary
Fields Modifier and Type Field Description static String
NUMBERS_AS_LOWER_CASE_LETTERS_PATTERN
static String
NUMBERS_AS_UPPER_CASE_LETTERS_PATTERN
-
Constructor Summary
Constructors Constructor Description UnderscoredCamelCaseResolver()
UnderscoredCamelCaseResolver(String extension)
UnderscoredCamelCaseResolver(String extension, String resolutionPattern)
UnderscoredCamelCaseResolver(String extension, String resolutionPattern, Locale locale)
-
Method Summary
Modifier and Type Method Description StoryPathResolver
removeFromClassName(String wordToRemove)
protected String
resolveName(Class<? extends Embeddable> embeddableClass)
-
Methods inherited from class org.jbehave.core.io.AbstractStoryPathResolver
resolve, resolveDirectory
-
-
-
-
Field Detail
-
NUMBERS_AS_LOWER_CASE_LETTERS_PATTERN
public static final String NUMBERS_AS_LOWER_CASE_LETTERS_PATTERN
- See Also:
- Constant Field Values
-
NUMBERS_AS_UPPER_CASE_LETTERS_PATTERN
public static final String NUMBERS_AS_UPPER_CASE_LETTERS_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
resolveName
protected String resolveName(Class<? extends Embeddable> embeddableClass)
- Specified by:
resolveName
in classAbstractStoryPathResolver
-
removeFromClassName
public StoryPathResolver removeFromClassName(String wordToRemove)
-
-