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

Unable to pass newlines as a parameter #30

Closed
jalaziz opened this issue Feb 4, 2015 · 2 comments
Closed

Unable to pass newlines as a parameter #30

jalaziz opened this issue Feb 4, 2015 · 2 comments

Comments

@jalaziz
Copy link

jalaziz commented Feb 4, 2015

I was trying to use JUnitParams to help me parameterize a test for various types of line breaks. The tests were failing and upon further inspection, I came to realize that of the standard line breaks the parameter was an empty string.

Digging through the JUnitParams source, I believe the problem lies in Utils.splitAtCommaOrPipe(). However, I'm not entirely sure what the correct behavior should be. Whitespace should be trimmed in most cases, but it's feasible that you'd want whitespace to be passed as a parameter.

It seems that the workaround is simply to use a method or provider class to supply the values, so this may be intended behavior.

@michal-lipski
Copy link
Contributor

I think that making whitespace characters available in parameters annotation can make code for parsing it too complicated. Besides, it will be more readable and explicit to provide them with method like you proposed.

Thanks for rising this.

@coopstah13
Copy link

I'm using a source class and it still does not work for me

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

No branches or pull requests

3 participants