-
Notifications
You must be signed in to change notification settings - Fork 9
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
[New Feature] Allow injection in Extensions #6
Comments
What's your use case? I think this is already supported if you use
Will add a test shortly to confirm |
Tried your suggestion and it seems it doesn't work. Does it work for you? My usecase: I need to be able to inject config objects etc. into my custom extensions.
|
This did work for me. See https://github.com/JeffreyFalgout/junit5-extensions/blob/master/guice-extension/src/test/java/name/falgout/jeffrey/testing/junit/guice/InjectExtensionsTest.java Adding
|
Try implementing BeforeAllCallback. beforeAll() method is not executed for me. |
Ah, that's tricky. Instance fields cannot implement
And static Perhaps we need a method to create an instance with
|
Sounds good to me |
As I understand currently this extension allows injection only inside test classes. It would be good to have ability to inject fields inside junit5 custom Extension classes
The text was updated successfully, but these errors were encountered: