Open jamezp opened 2 months ago
Theoretically, if there were to be multiple ParameterResolver
s apart from new Arquillian one and the existing JUnit one, the @JunitParam
wouldn't be exactly correct.
IIUC the annotation is meant to "do not use arquillian parameter resolution for this parameter", so perhaps something like @SkipArquillianParameterResolution
or @SkipArquillianParameterResolver
? :-)
Yes, that's where I got @ArquillianIgnore
from. I was trying to think of something somewhat short.
Yes, that's where I got
@ArquillianIgnore
from. I was trying to think of something somewhat short.
I am afraid it cannot be short without compromising on clarity since stuff like ArquillianIgnore
can easily be mistaken for being something else. Sounds to me it should be at least 3 words - @Ignore/Skip-Arquillian-Resolution/Resolver/Parameter
The JunitParam
will be applied on the original Junit parameter injection?
How to keep the compatible with the existing testing libs that already used the JUnit param injection. If we need an explicit qulifier for our Arquillian param injection, I would like to add the annotation to the Arquillian method params. eg. @ArquillianParam
, it also can be used for CDI scan to filter the method injections.
@hantsy Sorry for the delayed response. This is only an issue if there is a conflict to a parameter both JUnit and Arquillian can produce. For example, if you created a JUnit ParameterResolver
for URI
, Arquillian might be the one injecting the URI
instead of your custom ParameterResolver
.
What an introduced annotation would do is act like a CDI @Vetoed
annotation where Arquillian would not attempt to inject the parameter.
Issue Overview
Both Arquillian and JUnit 5 allow for parameters to be resolved for methods. In #608 we added support for this. However, there could be cases when we want have Arquillian ignore those parameters. For those cases we should we should add parameter, something like
@JunitParam
or@ArquillianIgnore
which will allow otherParameterResolver
's to resolve the method parameter.