Test classes should be in a separate directory instead of in separate packages
jolkdarr opened this issue · 4 comments
A test directory should contain all test classes.
Useful with JUnit or when building distributions.
I've always preferred having the tests as close to the source as possible. I am planning a re-org in the near future to clean up some of the classes hierarchy. I'll look into best practices and take your advice into consideration.
The use of a separate test folder structured consistently with the source folder is the most general pattern.
It allows an easier handling/filtering of test classes that may, for instance, packaged in a distinct jar.
See also Maven recommendations and explanations:
https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
Thanks for the motivation @jolkdarr, I've moved to a java.net flavor of directory layout. e.g.
PROJECT_ROOT
+--- src/
+----test/
Thank you Justin for that task. I will pull the new commit in few days.