public interface QuarkusTestResourceLifecycleManager
These resources are started before the first test is run, and are closed
at the end of the test suite. They are configured via the QuarkusTestResource
annotation, which can be placed on any class in the test suite.
These can also be loaded via a service loader mechanism, however if a service
loader is used it should not also be annotated as this will result in it being executed
twice.
Note that when using these with QuarkusUnitTest (rather than @QuarkusTest) they run
before the ClassLoader has been setup. This means injection may not work
as expected.
Due to the very early execution in the test setup lifecycle, logging does not work in such a manager.
| Modifier and Type | Method and Description |
|---|---|
default void |
init(Map<String,String> initArgs)
Arguments passed to the lifecycle manager before it starts
These arguments are taken from
QuarkusTestResource#initArgs()
The args is never null |
default void |
inject(Object testInstance)
Allow each resource to provide custom injection of fields of the test class
|
default int |
order()
If multiple Test Resources are specified,
this control the order of which they will be executed.
|
Map<String,String> |
start()
Start the test resource.
|
void |
stop()
Stop the test resource.
|
Map<String,String> start()
void stop()
default void init(Map<String,String> initArgs)
QuarkusTestResource#initArgs()
The args is never nullQuarkusTestResource.initArgs()default void inject(Object testInstance)
default int order()
Copyright © 2020 JBoss by Red Hat. All rights reserved.