Closed DenWav closed 3 months ago
When using a global @TestsAdvice with a named parsers, the injection of the named parser will always fail before TestWithResourcesExtension checks for the presence of a With<Parser> member in a tests advice class.
@TestsAdvice
TestWithResourcesExtension
With<Parser>
The error that no parser of the given name can be found occurs here: https://github.com/hosuaby/inject-resources/blob/b7416cbcb5f99b45fdc4acf80b3522e528a8c342/inject-resources-junit-jupiter/src/main/java/com/adelean/inject/resources/junit/jupiter/TestWithResourcesExtension.java#L43
But TestsAdviceProcessor is not called until after that: https://github.com/hosuaby/inject-resources/blob/b7416cbcb5f99b45fdc4acf80b3522e528a8c342/inject-resources-junit-jupiter/src/main/java/com/adelean/inject/resources/junit/jupiter/TestWithResourcesExtension.java#L45-L50
TestsAdviceProcessor
Fixed in 0.3.4
When using a global
@TestsAdvice
with a named parsers, the injection of the named parser will always fail beforeTestWithResourcesExtension
checks for the presence of aWith<Parser>
member in a tests advice class.The error that no parser of the given name can be found occurs here: https://github.com/hosuaby/inject-resources/blob/b7416cbcb5f99b45fdc4acf80b3522e528a8c342/inject-resources-junit-jupiter/src/main/java/com/adelean/inject/resources/junit/jupiter/TestWithResourcesExtension.java#L43
But
TestsAdviceProcessor
is not called until after that: https://github.com/hosuaby/inject-resources/blob/b7416cbcb5f99b45fdc4acf80b3522e528a8c342/inject-resources-junit-jupiter/src/main/java/com/adelean/inject/resources/junit/jupiter/TestWithResourcesExtension.java#L45-L50