Class 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 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
    • Constructor Detail

      • UnderscoredCamelCaseResolver

        public UnderscoredCamelCaseResolver()
      • UnderscoredCamelCaseResolver

        public UnderscoredCamelCaseResolver​(String extension)
      • UnderscoredCamelCaseResolver

        public UnderscoredCamelCaseResolver​(String extension,
                                            String resolutionPattern)
      • UnderscoredCamelCaseResolver

        public UnderscoredCamelCaseResolver​(String extension,
                                            String resolutionPattern,
                                            Locale locale)