moq icon
moq icon

moq

Moq is the only mocking library for .NET developed from scratch to take full advantage of .NET Linq expression trees and lambda expressions, which makes it the most productive, type-safe and refactoring-friendly mocking library available.

Cost / License

  • Free
  • Open Source

Platforms

  • Windows
  • .NET Framework
  • Microsoft Visual Studio
-
No reviews
1like
1comment

Features

Suggest and vote on features

Properties

  1.  Minimalistic

Features

  1.  Code Completion
  2.  NET Framework
  3. Microsoft Visual Studio icon  Visual Studio integration

 Tags

  • mocking
  • mocking-library

moq News & Activities

Highlights All activities

Recent News

Show more news

Recent activities

No activities found.

moq information

  • Developed by

    moq
  • Licensing

    Open Source and Free product.
  • Written in

  • Alternatives

    2 alternatives listed
  • Supported Languages

    • English

AlternativeTo Category

Development

GitHub repository

  •  6,336 Stars
  •  842 Forks
  •  23 Open Issues
  •   Updated  
View on GitHub

Our users have written 1 comments and reviews about moq, and it has gotten 1 likes

moq was added to AlternativeTo by Danilo Venom on and this page was last updated .

Comments and Reviews

   
 Post comment/review
Top Negative Comment
inson1
0

What is moq?

Moq is the only mocking library for .NET developed from scratch to take full advantage of .NET Linq expression trees and lambda expressions, which makes 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.

Moq offers the following 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/Replay idioms to learn. Just construct your mock, set it up, use it and optionally verify calls to it (you may not verify mocks when they act as stubs only, or when you are doing more classic state-based testing by checking returned values from the object under test)
  • 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 mocks
  • Intuitive support for out/ref arguments

Official Links