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

Force parameters method to be static #138

Open
ypconstante opened this issue Sep 29, 2017 · 3 comments
Open

Force parameters method to be static #138

ypconstante opened this issue Sep 29, 2017 · 3 comments
Labels

Comments

@ypconstante
Copy link

It would be interesting if JUnitParams had some way to force all or to configure the method used as source of the parameters to be static, making it easier to users to prepare for the migration to JUnit 5 @MethodSource

@zbychupragmatists
Copy link
Contributor

I guess you want to point out all the places where you don't have static methods by some failing tests to be sure that all places are ready to migration. Unfortunately we miss such feature.

@ypconstante
Copy link
Author

I've made a custom annotation to implement this behavior using the junitparams.custom.CustomParameters annotation.
Currently it's not the most beautiful code because I had to copy a lot of code from ParamsFromMethodCommon, but it works like the JUnit 5 equivalent. Should I make a pull request or there is no plan to add this kind of functionality to JUnitParams?

@zbychupragmatists
Copy link
Contributor

Please make a pull request and we will see how it looks.

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

No branches or pull requests

2 participants