I'm currently writing some parameterized tests with JUnit 5 (using @EnumSource).
I'm trying to run a method before each test using the same parameter as the test itself, but JUnit fails with No ParameterResolver registered for parameter [...enum] in method [...beforeEach].
Is there a way to achieve this, or should I just make a private method to call at the beginning of each test?
It looks like this is not currently possible.
I resolved this by calling a method with test parameters at the beginning of each test.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With