Open GoogleCodeExporter opened 9 years ago
what you're looking for is the CallBase property on a Mock<T>:
new Mock<Foo> { CallBase = true }
Original comment by kzu.net
on 30 Jul 2010 at 5:07
Original comment by kzu.net
on 30 Jul 2010 at 5:07
Using CallBase, it's not clear how I link the behaviour of my mocked object to
my concrete instance X. Can you elaborate? (Apologies, I'm probably being a
little slow)
Original comment by rob.thom...@googlemail.com
on 31 Jul 2010 at 4:07
The "underlying object" is always (in Moq anyway) the base class from which the
mock of T inherits from.
You cannot pass an existing instance of T to a new Mock<T>. You get a new
instance of it already. CallBase allows Moq to call your base class members.
Original comment by kzu.net
on 2 Aug 2010 at 2:46
This is the feature I requested.
I want the behaviour of the mock<T> to default to the behaviour of X, an
*instance* of T. This is possible using CastleDynamicProxy, but without the
great features Moq offers.
Is this a feature that is likely to be compatible with Moq?
Original comment by rob.thom...@googlemail.com
on 2 Aug 2010 at 8:45
Issue 269 has been merged into this issue.
Original comment by kzu.net
on 3 Aug 2010 at 2:18
Now this makes perfect sense :)
Original comment by kzu.net
on 3 Aug 2010 at 2:19
Original comment by kzu.net
on 11 Aug 2010 at 5:20
Is there any progress on this feature request? Has it been implemented?
Original comment by rob.sw...@googlemail.com
on 22 Mar 2012 at 12:23
Nop. Good thing we moved to github (https://github.com/Moq/moq4) and anyone can
work on it on his own fork :)
Original comment by dan...@cazzulino.com
on 22 Mar 2012 at 2:37
Original issue reported on code.google.com by
rob.thom...@googlemail.com
on 30 Jul 2010 at 1:46