Moq 4.16.1 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Moq is the most popular and friendly mocking framework for .NET.

Built from https://github.com/moq/moq4/tree/fc484fb85

Install-Package Moq -Version 4.16.1
dotnet add package Moq --version 4.16.1
<PackageReference Include="Moq" Version="4.16.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Moq --version 4.16.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Moq, 4.16.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Moq as a Cake Addin
#addin nuget:?package=Moq&version=4.16.1

// Install Moq as a Cake Tool
#tool nuget:?package=Moq&version=4.16.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

A changelog is available at https://github.com/moq/moq4/blob/master/CHANGELOG.md.

NuGet packages (582)

Showing the top 5 NuGet packages that depend on Moq:

Package Downloads
AutoFixture.AutoMoq
This extension turns AutoFixture into an Auto-Mocking Container. The mock instances are created by Moq. To use it, add the AutoMoqCustomization to your Fixture instance. Read more at http://blog.ploeh.dk/2010/08/19/AutoFixtureAsAnAutomockingContainer.aspx
Autofac.Extras.Moq
Autofac extension for automocking and creation of mock objects in Moq.
Moq.AutoMock
An auto-mocking container that generates mocks using Moq
MockQueryable.Moq
Extension for mocking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc. When writing tests for your application it is often desirable to avoid hitting the database. The extension allows you to achieve this by creating a context – with behavior defined by your tests – that makes use of in-memory data.
Ninject.MockingKernel.Moq
Automock implementation for Moq using Ninject to create the objects under test.

GitHub repositories (872)

Showing the top 5 popular GitHub repositories that depend on Moq:

Repository Stars
microsoft/PowerToys
Windows system utilities to maximize productivity
Wox-launcher/Wox
Launcher for Windows, an alternative to Alfred and Launchy.
dotnet-architecture/eShopOnContainers
Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 5, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor.
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
icsharpcode/ILSpy
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!

Version History

Version Downloads Last updated
4.16.1 12,954,666 2/23/2021
4.16.0 4,329,883 1/16/2021
4.15.2 5,129,332 11/26/2020
4.15.1 2,669,856 11/10/2020
4.14.7 3,730,742 10/14/2020
4.14.6 1,722,000 9/30/2020
4.14.5 11,987,206 7/1/2020
4.14.4 1,042,048 6/24/2020
4.14.3 930,644 6/18/2020
4.14.2 631,644 6/16/2020
4.14.1 7,739,238 4/28/2020
4.14.0 646,097 4/24/2020
4.13.1 27,677,032 10/19/2019
4.13.0 6,895,371 8/31/2019
4.12.0 9,445,715 6/20/2019
4.11.0 3,238,797 5/27/2019
4.11.0-rc2 4,468 5/27/2019
4.11.0-rc1 168,078 4/19/2019
4.10.1 22,363,542 12/3/2018
4.10.0 10,524,507 9/8/2018
4.9.0 6,563,960 7/13/2018
4.8.3 3,959,739 6/9/2018
4.8.2 9,403,217 2/23/2018
4.8.1 3,946,746 1/8/2018
4.8.0 1,295,778 12/24/2017
4.8.0-rc1 43,231 12/8/2017
4.7.145 5,410,498 11/6/2017
4.7.142 2,263,421 10/10/2017
4.7.137 796,163 10/3/2017
4.7.127 654,547 9/25/2017
4.7.99 4,637,335 7/17/2017
4.7.63 1,388,422 6/21/2017
4.7.58 65,879 6/20/2017
4.7.49 342,840 6/18/2017
4.7.46 50,555 6/18/2017
4.7.25 1,073,421 6/2/2017
4.7.12 211,714 5/30/2017
4.7.11 4,542 5/30/2017
4.7.10 968,451 5/6/2017
4.7.9 351,366 4/29/2017
4.7.8 1,463,912 3/26/2017
4.7.7 25,149 3/25/2017
4.7.1 1,334,988 2/28/2017
4.7.0 3,336,043 2/22/2017
4.6.62-alpha 5,222 2/21/2017
4.6.39-alpha 12,394 2/18/2017
4.6.38-alpha 681,431 8/20/2016
4.6.36-alpha 200,627 7/20/2016
4.6.25-alpha 98,950 6/6/2016
4.5.30 2,668,590 1/9/2017
4.5.29 974,606 12/10/2016
4.5.28 1,388,854 11/10/2016
4.5.23 948,069 10/11/2016
4.5.22 641,461 9/20/2016
4.5.21 1,330,672 8/12/2016
4.5.20 9,122 8/12/2016
4.5.19 77,282 8/10/2016
4.5.18 5,956 8/10/2016
4.5.16 646,100 7/18/2016
4.5.13 158,753 7/11/2016
4.5.10 499,797 6/21/2016
4.5.9 497,618 6/9/2016
4.5.9-alpha 9,222 5/22/2016
4.5.8 626,042 5/26/2016
4.5.7 7,365 5/26/2016
4.5.7-alpha 3,647 5/22/2016
4.5.6-alpha 3,833 5/22/2016
4.5.3 625,430 5/25/2016
4.5.0 200,274 5/24/2016
4.2.1510.2205 6,145,441 10/22/2015
4.2.1507.118 2,248,794 7/1/2015
4.2.1506.2515 112,847 6/25/2015
4.2.1506.2016 60,436 6/20/2015
4.2.1502.911 2,378,869 2/9/2015
4.2.1409.1722 1,710,636 9/17/2014
4.2.1408.717 763,677 8/7/2014
4.2.1408.619 24,713 8/6/2014
4.2.1402.2112 1,903,333 2/21/2014
4.2.1312.1622 749,683 12/17/2013
4.2.1312.1621 5,103 12/16/2013
4.2.1312.1615 5,657 12/16/2013
4.2.1312.1416 17,913 12/14/2013
4.2.1312.1323 5,698 12/14/2013
4.2.1312.1319 30,626 12/13/2013
4.1.1311.615 280,098 11/18/2013
4.1.1309.1617 506,205 9/16/2013
4.1.1309.919 257,090 9/9/2013
4.1.1309.801 11,131 9/8/2013
4.1.1309.800 4,856 9/8/2013
4.1.1308.2321 801,532 8/23/2013
4.1.1308.2316 7,259 8/23/2013
4.1.1308.2120 626,600 8/21/2013
4.0.10827 3,471,347 2/9/2011
3.1.416.3 171,645 2/9/2011