Moq/moq4 — pull request #19 by yorah (2012-06-20 22:57:35+00:00)
Title: Fix using Mock.Of on objects having properties with private setters

Fixes #14

I *think* my fix is valid (I'm basically converting to SetupGet when the setter is private).

@danielkzu the problem was that in MockSetupsBuilder, the ``property.DeclaringType`` is the *real type* (``Moq.Tests.Foo``), whereas in ``SetupPropery``, the type on which we work is the ``FooProxy``. I think there is something going on in DynamicProxy2 (something like: when the setter of a property is private, it's not proxied in the proxy class).