skip to the main content area of this page
Patterns and Practices

 

Download Moq 2.6 - Recursive Mocks and Mocked Default Values - .NET Mocking Library


You can download Moq 2.6, which has a number of bug fixes as well as two new features - Recursive Mocks and Mocked Default Values.

Moq Features:

  • Strong-typed: no strings for expectations, no object-typed return values or constraints
  • Unsurpassed VS intellisense integration: everything supports full VS intellisense, from setting expectations, to specifying method call arguments, return values, etc.
  • No Record/Reply idioms to learn. Just construct your mock, set your expectations, use it and optionally verify them
  • VERY low learning curve as a consequence of the previous three points. For the most part, you don't even need to ever read the documentation. Granular control over mock behavior with a simple MockBehavior enumeration (no need to learn what's the theoretical difference between a mock, a stub, a fake, a dynamic mock, etc.)
  • Mock both interfaces and classes
  • Override expectations: can set default expectations in a fixture setup, and override as needed on tests
  • Pass constructor arguments for mocked classes
  • Intercept and raise events on mocksIntuitive support for out/ref arguments

Read what kzu says about Recurisve Mocks and Mocked Default Values in Moq 2.6.

Download Moq 2.6 here.

 

Related Posts


Tags: Moq


Topics



 

Popular Tags



Recent Links