Created Friday 18 April 2014
- can mock instances of classes only
- mocks
virtual
methods only - mocks
protected
methods but you lose LINQ compile-time checks - can mock any method in an interface
- to mock
static
methods/classes see NETFramework:CSharp:UnitTests:Moles - "workarounds" exist to mock CSharp:ExtensionMethods but you need to change the source code. See here
Tutorials
Protected Methods
- use
Protected()
found inMock.Protected
- Make internals of project visible to MOQ. See http://code.google.com/p/moq/issues/detail?id=271