[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-dev
Subject:    Re: [groovy-dev] About MockFor / StubFor / ProxyMetaClass
From:       Guillaume Laforge <glaforge () codehaus ! org>
Date:       2009-01-21 11:13:03
Message-ID: 197b18fc0901210313ua5b2a4ag24b8d77776bbea63 () mail ! gmail ! com
[Download RAW message or body]

On Wed, Jan 21, 2009 at 12:07 PM, Dierk König <dierk.koenig@canoo.com> wrote:
> Applying the proposed change is ok for me.

Okie dokie, so I'll apply the patch.

> I don't see any need for changing MockFor and StubFor the same way, though.
> Therefore, I would leave them as is in RC-2.

Ok, it was just a suggestion, seeing the changes to PMC, I thought it
could have been useful for MockFor / StubFor too, and I couldn't think
of a negative impact.

> For later releases it would make sense to go over the whole MockFor/StubFor
> design, where I see some issues:
> - replace ProxyMetaClass with EMC (it was all done before EMC was available)
> - support intercepting ctors
> - support self-mocking/-stubbing (mock/stub out selected methods in the CUT
> - no collaborator involved)
> But these are new features and should therefore be introduced with a "new
> feature" release.

Also seeing "GMock" being released, I was wondering how StubFo /
MockFor do compare, and the possibilities of merging those efforts, or
something like that.
http://gmock.org/

Have you looked at GMock?

Guillaume


>> This question may probably be more for Dierk and Paul since they worked on
>> this.
>>
>> I was looking at:
>> http://jira.codehaus.org/browse/GROOVY-3290
>>
>> The idea is to change ProxyMetaClass#use(Closure) to return the value
>> returned by the closure call, rather than returning void.
>>
>> ProxyMetaClass being used in StubFor and MockFor in their own
>> use(Closure) methods, I was also wondering whether it'd be a good idea
>> to also make these two methods actually return the value returned by
>> executing the closure.
>>
>> Should we apply the change as is in RC-2?
>> Or should we also change StubFor and MockFor similarily?
>> Do you see any impact into doing that change?
>> Or perhaps should we better wait for 1.6.1 to make these changes?
>>
>> --
>> Guillaume Laforge
>> Groovy Project Manager
>> Head of Groovy Development at SpringSource
>> http://www.springsource.com/g2one
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>



-- 
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic