In search of a solution to this and somehow that , I tried to create packages to separate main and test , and then use the compiler with added modules to perform unit tests. Not a very good way, but only a hypothetical structure.

A few open questions that I continued were as follows: -
- Add a module based on JDK9 to the project.
- Add JUnit5 to the classpath using the IntelliJ shortcut. (lib folder) [
junit-jupiter-api-5.0.0.jar ]
Q. Note that it brings opentest4j-1.0.0.jar to the lib / folder. Why is this, why is another bank used?
Add classes and generate some test method accordingly.
Compile a sample project (share simply to draw an image of the directory structure used) with the command
javac --module-path lib -d "target" $(find src -name "*.java")
Results in warnings like -
warning: unknown enum constant Status.STABLE reason: class file for org.apiguardian.api.API$Status not found warning: unknown enum constant Status.STABLE 2 warnings
Note : -
I find the use of junit-jupiter suspicious, because if I comment on the code using JUnit and execute the same command, everything looks fine.
Libraries / Tools , if it may matter: -
junit-jupiter-api-5.0.0 with- Java Version
"9" (build 9+181) - IntelliJ
2017.2.5
Q. What could be the likely cause of such a warning? Moreover, I can not find the API.Status in my project and outside the project classes.
java unit-testing java-9 junit5
nullpointer
source share