Mocking and stubbing easier than ever with Moq 2.6

I've just released a new version of Moq which contains a few bug fixes but two extremely useful features: recursive mocks and mocked default values.

Recursive mocks

Quite often you have a root mock object from which other mocks should "hang" through property accesses, such as HttpContextBase.Response: you want the response object returned to also be a mock.

Setting such hierarchies before this release was quite verbose:...

Read full article

No Comments