-
Notifications
You must be signed in to change notification settings - Fork 31
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
@ExplicitParamInjection change in behavior #164
Comments
Hello, the Note that one other way to enable this globally is a system property - https://github.com/weld/weld-testing/tree/master/junit5#explicit-parameter-injection
We should definitely at least mention it. |
Thanks for having a look at this. Yes, i have seen no claim that the
|
Ah, this issue got completely off my radar, thanks for the reminder!
@mkouba ? :) |
Another option is to add boolean flag to control the param injection, i.e. Although the "Explicit" would be a little bit superfluous here and |
Ok, that's very close to what I suggested but has perhaps better default behavior. So +1 and let's do it this way.
It is what it is and we don't want to break existing apps by changing it. |
👍 |
I am willing to give it a try, but can't make any promises about when and how much time i get to invest there. |
Ah cool, i forked the code and created some tests, but i was still trying to figure out the hirachical-context mechanisms |
I have two similar Test-Classes (in two seperate, but similar projects), one running with weld-junit5:2.0.2.Final (because it has to be compatible with the older API) and a newer Test wich runs with weld-junit5:4.0.1.Final.
These tests use jUnit5's
@Nested
-classes and additional extensions with parameter-resolvers.In the older version it sufficed to put
@ExplicitParamInjection
on the surrounding test-class and it worked for all tests run.In the newer version i apparently have to put the annotation on every
@Nested
-class, which is an unexpected and unwelcome bloat.I would prefer the old behavior, or at least a hint in the annotation's javadoc and/or documentation.
The text was updated successfully, but these errors were encountered: