Moq 4.16.1

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"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Release Notes

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

NuGet packages (529)

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 (782)

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 17,566 2/23/2021
4.16.0 1,025,550 1/16/2021
4.15.2 2,029,670 11/26/2020
4.15.1 1,192,857 11/10/2020
4.14.7 2,059,911 10/14/2020
4.14.6 1,008,575 9/30/2020
4.14.5 7,706,115 7/1/2020
4.14.4 737,150 6/24/2020
4.14.3 670,340 6/18/2020
4.14.2 393,006 6/16/2020
4.14.1 5,531,119 4/28/2020
4.14.0 472,335 4/24/2020
4.13.1 21,698,592 10/19/2019
4.13.0 5,807,224 8/31/2019
4.12.0 8,222,655 6/20/2019
4.11.0 2,782,975 5/27/2019
4.11.0-rc2 4,232 5/27/2019
4.11.0-rc1 143,293 4/19/2019
4.10.1 19,624,953 12/3/2018
4.10.0 9,572,789 9/8/2018
4.9.0 5,739,502 7/13/2018
4.8.3 3,505,312 6/9/2018
4.8.2 8,464,497 2/23/2018
4.8.1 3,533,232 1/8/2018
4.8.0 1,076,228 12/24/2017
4.8.0-rc1 42,104 12/8/2017
4.7.145 4,952,184 11/6/2017
4.7.142 2,165,553 10/10/2017
4.7.137 656,475 10/3/2017
4.7.127 600,086 9/25/2017
4.7.99 4,296,917 7/17/2017
4.7.63 1,283,472 6/21/2017
4.7.58 63,142 6/20/2017
4.7.49 333,461 6/18/2017
4.7.46 43,916 6/18/2017
4.7.25 1,011,591 6/2/2017
4.7.12 197,091 5/30/2017
4.7.11 4,283 5/30/2017
4.7.10 905,026 5/6/2017
4.7.9 333,655 4/29/2017
4.7.8 1,372,520 3/26/2017
4.7.7 24,716 3/25/2017
4.7.1 1,267,100 2/28/2017
4.7.0 2,328,560 2/22/2017
4.6.62-alpha 5,050 2/21/2017
4.6.39-alpha 11,989 2/18/2017
4.6.38-alpha 666,283 8/20/2016
4.6.36-alpha 198,015 7/20/2016
4.6.25-alpha 95,627 6/6/2016
4.5.30 2,351,012 1/9/2017
4.5.29 907,912 12/10/2016
4.5.28 1,242,174 11/10/2016
4.5.23 888,398 10/11/2016
4.5.22 589,481 9/20/2016
4.5.21 1,254,518 8/12/2016
4.5.20 8,843 8/12/2016
4.5.19 63,605 8/10/2016
4.5.18 5,452 8/10/2016
4.5.16 592,481 7/18/2016
4.5.13 152,349 7/11/2016
4.5.10 467,180 6/21/2016
4.5.9 463,439 6/9/2016
4.5.9-alpha 8,913 5/22/2016
4.5.8 603,318 5/26/2016
4.5.7 6,855 5/26/2016
4.5.7-alpha 3,479 5/22/2016
4.5.6-alpha 3,605 5/22/2016
4.5.3 522,321 5/25/2016
4.5.0 182,725 5/24/2016
4.2.1510.2205 5,659,991 10/22/2015
4.2.1507.118 2,120,487 7/1/2015
4.2.1506.2515 100,051 6/25/2015
4.2.1506.2016 58,682 6/20/2015
4.2.1502.911 2,215,067 2/9/2015
4.2.1409.1722 1,570,992 9/17/2014
4.2.1408.717 724,328 8/7/2014
4.2.1408.619 24,457 8/6/2014
4.2.1402.2112 1,812,854 2/21/2014
4.2.1312.1622 703,328 12/17/2013
4.2.1312.1621 4,879 12/16/2013
4.2.1312.1615 5,440 12/16/2013
4.2.1312.1416 17,506 12/14/2013
4.2.1312.1323 5,279 12/14/2013
4.2.1312.1319 24,886 12/13/2013
4.1.1311.615 270,723 11/18/2013
4.1.1309.1617 467,588 9/16/2013
4.1.1309.919 252,456 9/9/2013
4.1.1309.801 10,582 9/8/2013
4.1.1309.800 4,619 9/8/2013
4.1.1308.2321 770,090 8/23/2013
4.1.1308.2316 6,710 8/23/2013
4.1.1308.2120 488,424 8/21/2013
4.0.10827 3,187,560 2/9/2011
3.1.416.3 143,691 2/9/2011