You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>)
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
ininject()
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)
quarkusio#18698
The text was updated successfully, but these errors were encountered: