how does IntelliJ IDEA support unit testing for jigsaw modules?

Answered

My environment:

  • IntelliJ 2020.2 Ultimate Edition, build from 9/15/2020
  • Java 15
  • Maven 3.6.3 (running the latest plugins)
  • JUnit 5.7.0
  • Using Jigsaw modules

Blackbox testing is clear. Just use the API of the module under test.

Whitebox or unit testing is a bit more tricky due to the encapsulation of the modules internal classes.

Status quo: I got Maven to compile and run unit tests by inserting a module-info.java into the root test directory. But now the editor does not know the business class anymore. Ses my commentary here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000101580/comments/360002209139 

Is there a solution out there I don't know? What are jetbrains intentions to support unit testing of jigsaw modules? Maybe there are some articles on this subect I didn't find ... I don't know ...

1 comment
Comment actions Permalink

Hello, 

From the description the problem is not quite clear. Can you please create an issue at YouTrack providing a code sample illustrating the case (https://youtrack.jetbrains.com/issues). Thank you 

0

Please sign in to leave a comment.