At 12:43 24/2/01 -0600, Erik Engstrom wrote: >>>util.test, util.cli.test etc.: shouldn't those be in the testlet >>>package? Or if it's specific to test the kernel into phoenix? > >they aren't testing framework but test cases. ie in each of those packages >is the unit tests for superioir package. > >How about a directory structure such as: > >src/main/org/apache/avalon/util >and >src/test/org/apache/avalon/util? > >That way you separate your test code from your production code and retain access to protected access methods for testing. > >Just a thought.
Thats how I usually set it up but I have found that this sometimes inhibits people actually writing test cases. (Well thats at least the case in commercial settings - not sure about opensource). Ideally the testing code is as close to the actual code as possible to encourage people to write/adapt maintain test cases. Another option that I have been considering is that you postfix "Testlet" to class name to get test cases. So if you have component com.biz.Foo its test cases would be in class com.biz.FooTestlet. Not sure if that is any better. I keep meaning to remove test cases from jars via an exclude ;) Cheers, Pete *-----------------------------------------------------* | "Faced with the choice between changing one's mind, | | and proving that there is no need to do so - almost | | everyone gets busy on the proof." | | - John Kenneth Galbraith | *-----------------------------------------------------*
