db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <to...@first.fhg.de>
Subject Re: [VOTE] Change package names for junit test classes
Date Fri, 11 Jun 2004 13:15:28 GMT
On Fri, 11 Jun 2004, Chris Greenlee wrote:

> As an FYI, this makes it impossible to test protected methods, which is
> sometimes advisable (especially in a base class).  Is there a reason to make
> this change?

Its probably personal preference, but a separation between implementation
and tests is IMO a good thing (this includes the package in which they
As for testing protecting/friendly/private features, well, there's two
answers to that:

* It is possible to test these via extensions to Junit; have a look at the
JUnit site (http://www.junit.org). Also, protected features can always be
tested by subclassing them in the test (which is IMO a clean way to do

* There is the general question as to whether friendly/private, and to
some extent protected, features should be tested at all since tests should
test the class, not the method (except for service methods which are
usually static, anyway).
If I recall correctly, there was a discussion about this on the
refactoring mailing list (http://groups.yahoo.com/group/refactoring but


To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message