micromata / sawdust Goto Github PK
View Code? Open in Web Editor NEWJava module system and JUnit 5 tests
License: MIT License
Java module system and JUnit 5 tests
License: MIT License
ETA: end of April (https://github.com/junit-team/junit5/milestone/26)
White-box testing of module sawdust.alpha
is skipped at the moment.
And...
The TestCompilerMojo throws an exception when only the test sources contains a module descriptor.
Initial Eclipse support was added via b693312
You may import 3 projects (1 root, 2 nested) into your workspace:
Running JUnit 5 tests is not supported, yet.
I've tried the newest version of IntelliJ EAP (2020.1) and still, IntelliJ complains about the two module-info.java via:
'module-info.java' already exists in the module
Maven compiles just fine though. And I was not able to find any other problems besides these red underlines that indicate errors in IntelliJ.
Any ideas about that?
https://github.com/junit-team/junit5-samples/tree/master/junit5-modular-world contains a minimal setup with black-box and white-box testing samples.
Sorry, I know this is more a question than an issue, but I got confused by some objections I had to face on testing in a modular context that I want to be cleared :)
Let's suppose we have the following project structure:
src/
main/
java/
my.library/
internals/
Internal.java
Util.java
module-info.java
with the following module-info
:
module my.library {
exports my.library;
}
In order to make tests on Internal.java
as well, I have to define another module-info
with the following project structure for test
folder only, and fix the original module-info
:
src/
main/
java/
my.library.test/ <<<<< pay attention
internals/
InternalTest.java
UtilTest.java
module-info.java
with the following module-info
:
open module my.library.test {
requires my.library;
requires // junit, assert4j, ...
}
with the fix for the original module-info
:
module my.library {
exports my.library;
exports my.library.internals to my.library.test;
}
Do you know if there is any evident issue with this approach? Unfortunately, this is the only way I found to make IntelliJ happy.
Thank you in advance for any reply!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.