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"
#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 (545)

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

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 1,340,240 2/23/2021
4.16.0 2,037,382 1/16/2021
4.15.2 2,877,069 11/26/2020
4.15.1 1,562,060 11/10/2020
4.14.7 2,524,234 10/14/2020
4.14.6 1,196,781 9/30/2020
4.14.5 8,814,798 7/1/2020
4.14.4 809,030 6/24/2020
4.14.3 737,460 6/18/2020
4.14.2 446,236 6/16/2020
4.14.1 6,093,933 4/28/2020
4.14.0 518,238 4/24/2020
4.13.1 23,152,080 10/19/2019
4.13.0 6,067,375 8/31/2019
4.12.0 8,517,950 6/20/2019
4.11.0 2,894,351 5/27/2019
4.11.0-rc2 4,315 5/27/2019
4.11.0-rc1 148,590 4/19/2019
4.10.1 20,310,348 12/3/2018
4.10.0 9,814,379 9/8/2018
4.9.0 5,922,845 7/13/2018
4.8.3 3,608,164 6/9/2018
4.8.2 8,675,601 2/23/2018
4.8.1 3,626,624 1/8/2018
4.8.0 1,122,807 12/24/2017
4.8.0-rc1 42,480 12/8/2017
4.7.145 5,063,386 11/6/2017
4.7.142 2,187,628 10/10/2017
4.7.137 687,097 10/3/2017
4.7.127 612,179 9/25/2017
4.7.99 4,373,722 7/17/2017
4.7.63 1,305,618 6/21/2017
4.7.58 63,700 6/20/2017
4.7.49 336,574 6/18/2017
4.7.46 45,534 6/18/2017
4.7.25 1,024,885 6/2/2017
4.7.12 200,897 5/30/2017
4.7.11 4,383 5/30/2017
4.7.10 921,423 5/6/2017
4.7.9 337,927 4/29/2017
4.7.8 1,393,602 3/26/2017
4.7.7 24,879 3/25/2017
4.7.1 1,283,425 2/28/2017
4.7.0 2,530,728 2/22/2017
4.6.62-alpha 5,124 2/21/2017
4.6.39-alpha 12,208 2/18/2017
4.6.38-alpha 669,359 8/20/2016
4.6.36-alpha 199,320 7/20/2016
4.6.25-alpha 96,396 6/6/2016
4.5.30 2,423,892 1/9/2017
4.5.29 926,048 12/10/2016
4.5.28 1,277,536 11/10/2016
4.5.23 901,214 10/11/2016
4.5.22 602,437 9/20/2016
4.5.21 1,272,222 8/12/2016
4.5.20 8,934 8/12/2016
4.5.19 64,078 8/10/2016
4.5.18 5,601 8/10/2016
4.5.16 604,079 7/18/2016
4.5.13 153,692 7/11/2016
4.5.10 475,202 6/21/2016
4.5.9 472,676 6/9/2016
4.5.9-alpha 9,014 5/22/2016
4.5.8 610,040 5/26/2016
4.5.7 6,998 5/26/2016
4.5.7-alpha 3,546 5/22/2016
4.5.6-alpha 3,723 5/22/2016
4.5.3 546,630 5/25/2016
4.5.0 187,410 5/24/2016
4.2.1510.2205 5,764,132 10/22/2015
4.2.1507.118 2,149,023 7/1/2015
4.2.1506.2515 102,087 6/25/2015
4.2.1506.2016 59,192 6/20/2015
4.2.1502.911 2,252,693 2/9/2015
4.2.1409.1722 1,601,362 9/17/2014
4.2.1408.717 733,683 8/7/2014
4.2.1408.619 24,534 8/6/2014
4.2.1402.2112 1,832,965 2/21/2014
4.2.1312.1622 713,074 12/17/2013
4.2.1312.1621 4,948 12/16/2013
4.2.1312.1615 5,503 12/16/2013
4.2.1312.1416 17,613 12/14/2013
4.2.1312.1323 5,439 12/14/2013
4.2.1312.1319 26,257 12/13/2013
4.1.1311.615 272,847 11/18/2013
4.1.1309.1617 476,983 9/16/2013
4.1.1309.919 253,571 9/9/2013
4.1.1309.801 10,730 9/8/2013
4.1.1309.800 4,687 9/8/2013
4.1.1308.2321 785,499 8/23/2013
4.1.1308.2316 6,842 8/23/2013
4.1.1308.2120 518,654 8/21/2013
4.0.10827 3,248,126 2/9/2011
3.1.416.3 147,827 2/9/2011