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

Add basic injection capabilities to QuarkusTestResourceLifecycleManager #377

Closed
snowdrop-bot opened this issue Jul 15, 2021 · 0 comments
Closed
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@snowdrop-bot
Copy link
Collaborator

Description

As discussed on Zulip, it would come in handy if there was some convenient injection support in QuarkusTestResourceLifecycleManager.
Today you are on own since you only get the testInstance in inject() and you have to do all the hard reflection work yourself.

Implementation ideas

In a backward-compatible way, a new inject(BasicInjector injector) method could be introduced.
That BasicInbjector (or whatever its name is) wraps the test instance and could provide some basic convenience methods like:

  • injectIntoFields(Class<?> type, Object value) (or with <T>)
  • injectIntoFields(Class<? extends Annotation> type, Object value)
  • etc.

quarkusio#18698


$upstream:18698$

@snowdrop-bot snowdrop-bot added the upstream/closed The issue has been closed in the upstream repository label Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

2 participants