incubator-s4-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Junqueira <...@yahoo-inc.com>
Subject Re: S4 zk integration
Date Mon, 24 Oct 2011 11:35:41 GMT

On Oct 24, 2011, at 10:18 AM, Gianmarco De Francisci Morales wrote:

>> - test package names: I started using prefixing by test.s4, in  
>> order to
>> avoid any confusion with other classes from code. I'm ok for  
>> prefixing
>> tests
>> with org.apache.s4, but I think it should at least be  
>> org.apache.s4.test.
>> Which naming scheme do we choose?
>>
>>
> In my experience, putting tests in the same package as the class being
> tested helps a lot with interface design, i.e. you don't need to  
> make a
> method public to make it testable but you can use the default package
> visibility and yet not include it in the package-level API. This  
> makes it
> cleaner what the API itself is.
>
> An easy way to separate tests and source code is to have a /src  
> subdirectory
> and a /test subdirectory with mirrored source trees below (so you have
> src/org/apache/s4/ and test/org/apache/s4/ and classes in these two
> locations are in the same package).
>

This is a good suggestion. I would suggest that we instead have test  
under src, and separate test from main code under src, something like:

src/main
src/test

-Flavio

flavio
junqueira

research scientist

fpj@yahoo-inc.com
direct +34 93-183-8828

avinguda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300    fax (408) 349 3301


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message