diff --git a/README.md b/README.md index fd79de4..a67f4e3 100644 --- a/README.md +++ b/README.md @@ -49,4 +49,38 @@ this article: https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world.html#white-box-modular-testing-with-extra-java-command-line-options -TODO: examples of adding exceptions (copy from R5 or OTP2) \ No newline at end of file +In Gradle this might look like: +```Groovy +test { + useJUnitPlatform() + jvmArgs = ['--add-opens=java.base/java.io=ALL-UNNAMED', + '--add-opens=java.base/java.time=ALL-UNNAMED', + '--add-opens=java.base/java.time.zone=ALL-UNNAMED', + '--add-opens=java.base/java.lang=ALL-UNNAMED'] +} +``` + +In Maven: +```xml + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M7 + + + 3 + + + @{argLine} + -Xmx2G + -Dfile.encoding=UTF-8 + --add-opens java.base/java.io=ALL-UNNAMED + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/java.math=ALL-UNNAMED + --add-opens java.base/java.net=ALL-UNNAMED + + + +``` \ No newline at end of file