I’m getting back into Java after a long stint in the Ruby world and I’ve got a question about JUnit tests and the source I’m testing.
If I’ve got a package of graphics code for my company, lets call it com.example.graphics, should I include my tests in that package too or should they be included in a seperate package, like com.example.graphics.test?
In the same java package is fine. It’s actually necessary if you need to access package-private classes, methods, or fields. However, the source should be logically separate: