Do you think we should support mocking attributes?

4 views
Skip to first unread message

Johnny Jian

unread,
Mar 27, 2009, 9:59:01 AM3/27/09
to gmock-dev
For example:

def mock = mock()
mock.@field.returns(1)
play {
assertEquals 1, mock.@field
}

Julien

unread,
Mar 29, 2009, 3:25:11 PM3/29/09
to gmock-dev
I am not sure if we really want to do it. It seems to me that using
attribute is breaking encapsulation so we might not want to encourage
such practice.

I know we are using attributes in gmock in some really specific
situation but even there I sometimes feel that we could use some more
explicit properties.

On Mar 27, 2:59 pm, Johnny Jian <JohnnyJia...@gmail.com> wrote:
> For example:
>
> def mock = mock()
> mo...@field.returns(1)
> play {
>   assertEquals 1, mock.@field
>
>
>
> }
Reply all
Reply to author
Forward
0 new messages