tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Where to put a helper class for test?
Date Thu, 12 Sep 2013 19:57:16 GMT
Nick,

On 9/12/13 2:12 PM, Nick Williams wrote:
> 
> On Sep 12, 2013, at 1:03 PM, Mark Thomas wrote:
> 
>> On 12/09/2013 18:31, Nick Williams wrote:
>>> Mark,
>>>
>>> I'm working on revisions to my patch for BZ 55317 based on your
>>> feedback. In this feedback you said:
>>>
>>>> 5. I'm not a fan of the org.apache.tomcat.unittest package unless
>>>> the classes concerned are going to be used by multiple tests across
>>>> multiple packages.
>>>
>>> I put org.apache.tomcat.unittest.weaving.NeverUsedClass and
>>> org.apache.tomcat.unittest.weaving.UnweavedClass in this package
>>> because it seemed like a location that "helper" classes were being
>>> placed for other tests. However, I see your point about them only
>>> being used for one class. Should I just put these classes in
>>> org.apache.catalina.loader, the same package that
>>> TestWebappClassLoaderWeaving is in?
>>
>> That is the normal convention. Convention is also that they start
>> Tester... so they are excluded from the unit test scan.
>>
>> Mark
> 
> Okay. So I should rename the classes:
> 
> org.apache.catalina.loader.TesterNeverUsedClass
> org.apache.catalina.loader.TesterUnweavedClass
> 
> Did I understand that correctly?

What about using static inner classes in your test case?

-chris


Mime
View raw message