"Brekke, Jeff" wrote:
> How would one write a test for private methods unless the classitself was the test?
You couldn't, unless the member was package private.
> If we can test a class with private methods by not
> calling the private methods directly from the test, why can't we do the same
> with protected/package and put our tests in org.apache.turbine.test?
> I'm used to having test code separate from the actual code. This also provides
> a way to test the packaging and scope to ensure that it also works outside
> the package.
Like I said previously, it will be a bit of an adjustment for some of
you. "Scoping tests" would have some value if you're class loading
(which we do a bit of in Turbine), but otherwise what you're talking
about usually results in compiler errors any ways.
> If we go this route (code/tests in same place) can we have the default
> location for tests be org.apache.turbine.test, and only place a test along
> side the code if you have to?
I would find having code that runs the same type of test cases both
localized to the test package and scattered throughout the source tree
extremely confusing. It's a lot clearer to have the test cases with the
source code and the test suites and abstract test cases localize to the
test package.
--
Daniel Rall <[EMAIL PROTECTED]>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]