Closed michaldo closed 1 month ago
Library is compiled to work with multiple versions of JUnit, and 5.10.3 is one of them. This exception with reflexion may be due to version of Java. Which version are you using?
Library is compiled to work with multiple versions of JUnit, and 5.10.3 is one of them.
I would rather say "The library is compiled in hope to work with multiple versions of JUnit..."
It works with 5.11 with methods:
It does not work with 5.10 with methods:
BTW, in order to work with multiple versions of JUnit, code like "makeAccessible" should be self-implemented
The following code does not work for 5.10.3 and 0.3.4
@TestWithResources
class MyTest {
@GivenTextResource("/file.txt")
String file;
@Test
void test() {
System.out.println(file);
}
But the following, surprisingly works:
@Test
void test(@GivenTextResource("/file.txt") String file) {
System.out.println(file);
Java 21
I confirm this bug. looking for right solution.
Fixed in 0.3.5
Current JUnit version is 5.10.3 and code should be compiled to this version
inject-resources
fails with