shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared Bunting <jared.bunt...@peachjean.com>
Subject Re: AbstractShiroTest in shiro-core
Date Wed, 23 Nov 2011 02:39:39 GMT
Sure, here's a patch (I'm hoping the list won't strip it). Notice that
this takes a couple of static fields/methods and makes them test-method
specific. Alternatively, junit 4.10 allows the user to decide between
test-method and test-class level rules. This may be a better way to go,
but the code looks basically the same.

-Jared

On Tue 22 Nov 2011 06:59:12 PM CST, Les Hazlewood wrote:
>
> Hi Jared,
>
> I've not done that before - do you have an example or patch that shows
> how it would work?
>
> Cheers,
>
> Les
>
> On Wed, Nov 23, 2011 at 12:15 AM, Jared Bunting
> <jared.bunting@peachjean.com> wrote:
>>
>> What about reimplementing it as a Junit rule? There are often other
>> lifecycle bits that I want to incorporate in a unit test and having it
>> implemented as an abstract class seems to make this difficult.
>>
>> On Nov 22, 2011 5:54 PM, "Les Hazlewood" <lhazlewood@apache.org> wrote:
>>
>> 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 <allan@allanditzel.com>
>> wrote:
>>>
>>> The main value woul...
>>
>



Mime
View raw message