Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpecFlow conformant name mapping in nUnit test result provider #315

Merged

Conversation

danielpullwitt
Copy link

The name mapping of the nunit signature builder fails on presence of special characters (e.g. comma, hyphen).
Added the same regular expression translation steps as used by the SpecFlow code generator along with a unit test for the matching.

@dirkrombauts
Copy link
Member

Thanks for this contribution as well, and thanks for providing tests. I will review the pull request in detail tomorrow (European time).

@dirkrombauts
Copy link
Member

I agree in principle with your contribution. Just a few details with regard to code style and spelling - I will add them as comments to the changed files.

@@ -44,5 +48,8 @@ public Regex Build(ScenarioOutline scenarioOutline, string[] row)

return new Regex(stringBuilder.ToString());
}

private static readonly Regex punctuationCharactersRegex = new Regex(@"[\n\.-]+", RegexOptions.Compiled);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually follow the StyleCop rules that instruct us to add fields before methods.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, because the fields are static, I prefer the name to begin with an uppercase letter.

@danielpullwitt
Copy link
Author

I have applied your comments to our changes under the assumption you meant replacing tabs by spaces (at least this would be conforming to the project)?

@dirkrombauts
Copy link
Member

Lol yes you are correct I meant replacing the tabs with spaces. Thank you for thinking with me :-)

@dirkrombauts dirkrombauts merged commit f970d35 into picklesdoc:develop Apr 6, 2016
@dirkrombauts
Copy link
Member

Thanks again for your contributions, they are much appreciated!

@danielpullwitt danielpullwitt deleted the feature/NunitNameMapping branch April 6, 2016 13:31
@dirkrombauts dirkrombauts changed the title SpecFlow conformant name mapping SpecFlow conformant name mapping in nUnit test result provider Apr 12, 2016
@dirkrombauts
Copy link
Member

Released in version 2.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants