Fix and improve CamelCaseFunctionNameSanitizer #603

merged 2 commits into from Oct 12, 2013

2 participants


This fixes a bug that occurs for steps with more than one capture group, for example
Given I have "this" and "that"
An attempt to sanitize the function name throws a StringIndexOutOfBoundsException.
I also improved the formatting for steps/function names that have acronyms and camel/pascal case words in them.

Note: This is a copy of #592 that I sent earlier, but from the wrong branch.

friederbluemle added some commits Sep 18, 2013
@friederbluemle friederbluemle Fix exception in snippet generator
This fixes a StringIndexOutOfBoundsException that would occur in
CamelCaseFunctionNameSanitizer for function names with multiple spaces,
that is for step definitions with more than one capture group.
@friederbluemle friederbluemle Improve CamelCaseFunctionNameSanitizer
Function names are now correctly formatted if they contain acronyms. The
name sanitizer also will not change the case of words that are already
pascal or camel case in the input.
@aslakhellesoy aslakhellesoy added a commit that referenced this pull request Oct 12, 2013
@aslakhellesoy aslakhellesoy Refactor test, ref #603 e1b9fc7
@aslakhellesoy aslakhellesoy merged commit 383922e into cucumber:master Oct 12, 2013

1 check passed

Details default The Travis CI build passed
@friederbluemle friederbluemle deleted the friederbluemle:fix-snippet-exception branch Oct 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment