|
I don't have a problem with putting tests in the same package. Just put them in a different tree.
+- /src
+-- /com
+-- /foo
+--Bar.java
+- /test
+-- /com
+-- /foo
+-- testBar.java
This allows tests to access default package level methods and/or fields but keeps them out of the way of the main classes. Tests should be seperate from the classes their testing but the package namespace is not where they should be seperated. |