Moq in Microsoft Data Access Application Block
I just downloaded the latest release of the source code to the Microsof开发者_JAVA百科t Enterprise Library. When I tried to build the solution in Visual Studio 2010, I get the following error:
The type or namespace name 'Moq' could not be found (are you missing a using directive or an assembly reference?)
What is Moq and where can I find the assemblies
Moq (pronounced "Mock-you" or just "Mock") is the only mocking library for .NET developed from scratch to take full advantage of .NET 3.5 (i.e. Linq expression trees) and C# 3.0 features (i.e. lambda expressions) that make it the most productive, type-safe and refactoring-friendly mocking library available. And it supports mocking interfaces as well as classes. Its API is extremely simple and straightforward, and doesn't require any prior knowledge or experience with mocking concepts.
http://code.google.com/p/moq/
The assemblies are here. You probably want the 3.1 binaries.
Beside downloading DLL files from http://code.google.com/p/moq/ you need to add them in the bin reference of your application in VS.In VS ,right click on References and choose Add Reference.
精彩评论