Where was the stubbing part in Moq?
Posted by: eXtensible mind,
on 19 Nov 2008 |
View original | Bookmarked: 0 time(s)
In my very recent previous post I said "mocking and stubbing easier than ever", but actually forgot to mention the stubbing part :S. This one is not new for users of moq-contrib, but we decided to move this to the core Moq library as we get the question on how to stub properties often enough... :) It's actually rather simple and easy to implement just by using Moq external API, but as a facility, here's what you can do:var mock = new Mock<IHaveValue>();
// start "tracking" sets/gets to this...