NSubstitute 1.7.2 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved

.NET Framework 3.5
There is a newer version of this package available.
See the version list below for details.
Install-Package NSubstitute -Version 1.7.2
dotnet add package NSubstitute --version 1.7.2
<PackageReference Include="NSubstitute" Version="1.7.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NSubstitute --version 1.7.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NSubstitute, 1.7.2"
#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 NSubstitute as a Cake Addin
#addin nuget:?package=NSubstitute&version=1.7.2

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

NSubstitute is a friendly substitute for .NET mocking frameworks. It has a simple, succinct syntax to help developers write clearer tests. NSubstitute is designed for Arrange-Act-Assert (AAA) testing and with Test Driven Development (TDD) in mind.

Product Versions
.NET Framework net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (146)

Showing the top 5 NuGet packages that depend on NSubstitute:

Package Downloads
AutoFixture.AutoNSubstitute The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

This extension turns AutoFixture into an Auto-Mocking Container. The mock instances are created by NSubstitute. To use it, add the AutoNSubstituteCustomization to your Fixture instance.

AutofacContrib.NSubstitute

Package Description

MockQueryable.NSubstitute

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.

Sitecore.FakeDb.NSubstitute

Unit testing framework for Sitecore.

NSubstituteAutoMocker

AutoMocker for use with NSubstitute

GitHub repositories (220)

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

Repository Stars
dotnet/maui
.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
bitwarden/server
The core infrastructure backend (API, database, Docker, etc).
abpframework/abp
Open Source Web Application Framework for ASP.NET Core
kgrzybek/modular-monolith-with-ddd
Full Modular Monolith application with Domain-Driven Design approach.
Version Downloads Last updated
4.3.0 1,119,720 1/24/2022
4.2.2 13,670,192 6/13/2020
4.2.1 10,028,412 7/15/2019
4.2.0 1,775,541 5/19/2019
4.1.0 563,933 5/5/2019
4.0.0 2,733,811 1/30/2019
4.0.0-rc1 82,643 11/19/2018
3.1.0 9,625,647 10/27/2017
3.0.1 428,593 10/8/2017
2.0.3 4,643,456 4/25/2017
2.0.1-rc 149,382 12/17/2016
2.0.0-rc 161,849 8/7/2016
1.10.0 2,962,476 3/22/2016
1.9.2 1,091,536 10/22/2015
1.9.1 353,870 9/30/2015
1.8.2 872,466 5/29/2015
1.8.1 626,798 12/26/2014
1.8.0 112,173 11/11/2014
1.7.2 480,435 3/4/2014
1.7.1 206,535 1/16/2014
1.7.0 37,478 1/3/2014
1.6.1 240,408 6/30/2013
1.6.0 87,727 4/19/2013
1.5.0 272,762 1/25/2013
1.4.3 61,077 8/15/2012
1.4.2 24,453 7/1/2012
1.4.1 3,045 6/28/2012
1.4.0 22,757 5/4/2012
1.3.0 40,004 11/22/2011
1.2.1 5,891 10/10/2011
1.2.0 3,676 9/29/2011
1.1.0 33,892 5/21/2011
1.0.0 39,807 5/17/2011
0.9.5 3,801 1/7/2011
0.9.0.34 18,668 1/7/2011