While I agree that it is easy to copy-n-paste, I do believe it is
easier and more convenient to just depend on a test jar, subclass the
test class and be on your way writing tests.

Given the two options, my vote is to create a separate 'test' module
that people can depend on if they want.  People can depend on it if
they like, but they can just ignore it if they'd rather copy-n-paste.

My .02,

Les

On Tue, Nov 22, 2011 at 11:45 PM, Allan Ditzel <[email protected]> wrote:
> The main value would be in not having to worry about the clean up 
> binding/unbinding the subject and doing so in an exception safe manner.
>
> To put it differently, it makes it easy for someone to do unit testing in 
> their app without really having to add much thought to the internals of 
> Shiro. I thought one of the goals of the project was low barrier to entry?
>
> On Nov 22, 2011, at 3:36 PM, Kalle Korhonen wrote:
>
>> On Tue, Nov 22, 2011 at 3:18 PM, Allan Ditzel <[email protected]> wrote:
>>> This class would be useful for end users in writing their own unit tests,
>>> instead of having to copy-paste the example for the docs. However, where
>>> should this class reside? Do we want a separate test module that users
>>> include for their tests or should it be a part of the core module in its
>>> own testing package?
>>
>> Absolutely not in the same core package. There's no special reason to
>> avoid creating new modules since it's inexpensive, however I really
>> doubt it's usefulness considering there's only 70 or so lines of code,
>> most of it pass-through methods (i.e. where's the actual value in
>> setSecurityManager(SecurityManager securityManager)
>> {SecurityUtils.setSecurityManager(securityManager);}). Copy-paste
>> would allow evolving it to a different direction in client projects.
>>
>> Kalle

Reply via email to