BS> I'm wondering if there's a need for two kinds of tests - unit and
BS> spec. Of course, these two can be achieved in the same *Test.java files
BS> and separated simply by a comment line.
I personally like the 'separate spec test' idea more, but I have to admit that a gut feeling exists that it will end up in the same files, and moreover without that comment line.
Is there no reason why we couldn't have separate source directories, rather than having them in the same directory as the class itself? That way we could have:
src\org\apache\cache\Cache.java unit\org\apache\cache\CacheTest.java spec\org\apache\cache\CacheSpec.java
Plus it makes it a lot easier to build without test code, rather than relying on a naming convention. Don't know how easy it would be to integrate this into the maven build process, but since I've done it a few times with ant then it shouldn't be that difficult.
Alex.