Open u6f6o opened 5 years ago
On paper this sounds interesting, feel-free to propose a pull-request so we can concretely review it 😉
👍 done: #56
It seems like this issue is still not solved, and we have a duplicate: https://github.com/vert-x3/vertx-junit5/issues/70
I'd like to propose to adapt the
VertxExtension
in order to allow a manual configuration of theVertx
instance before injecting it in the test/setup/teardown methods.Junit5 offers a
@RegisterExtension
annotation that allows to configure extension objects. More information can be found here.Thus, the current mechanics, to simply inject a
Vertx
instance would still work, while users who'd like to adapt the settings of theVertx
instance for a given test case could still benefit from theVertxExtension
.In order to verify my proposal, I created a copy of the existing
VertxExtension
and added/adapted following code:Vertx
instance on invocationvertxSupplier
In the test class itself, we could provide a configured vertx instance instead of sticking with the default (kotlin code):
Hope you consider this proposal.