NSubstitute 5.3.0

Prefix Reserved
dotnet add package NSubstitute --version 5.3.0
                    
NuGet\Install-Package NSubstitute -Version 5.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NSubstitute" Version="5.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NSubstitute" Version="5.3.0" />
                    
Directory.Packages.props
<PackageReference Include="NSubstitute" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NSubstitute --version 5.3.0
                    
#r "nuget: NSubstitute, 5.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=NSubstitute&version=5.3.0
                    
Install NSubstitute as a Cake Addin
#tool nuget:?package=NSubstitute&version=5.3.0
                    
Install NSubstitute as a Cake Tool

NSubstitute is a friendly substitute for .NET mocking libraries. 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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (231)

Showing the top 5 NuGet packages that depend on NSubstitute:

Package Downloads
AutoFixture.AutoNSubstitute

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.

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.

PeanutButter.TestUtils.Generic

Some generic test utilites.

FunFair.Test.Common

FunFair Common Test Infrastructure for building xUnit tests on top of.

AutofacContrib.NSubstitute

Package Description

GitHub repositories (444)

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

Repository Stars
icsharpcode/ILSpy
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
dotnet/maui
.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
ardalis/CleanArchitecture
Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 9
bitwarden/server
Bitwarden infrastructure/backend (API, database, Docker, etc).
App-vNext/Polly
Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
kgrzybek/modular-monolith-with-ddd
Full Modular Monolith application with Domain-Driven Design approach.
dotnet-architecture/eShopOnWeb
Sample ASP.NET Core 8.0 reference application, now community supported: https://github.com/NimblePros/eShopOnWeb
dotnet/orleans
Cloud Native application framework for .NET
mRemoteNG/mRemoteNG
mRemoteNG is the next generation of mRemote, open source, tabbed, multi-protocol, remote connections manager.
lepoco/wpfui
WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
gitextensions/gitextensions
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
dotnet/eShop
A reference .NET application implementing an eCommerce site
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
elsa-workflows/elsa-core
A .NET workflows library
dotnetcore/CAP
Distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern
NLog/NLog
NLog - Advanced and Structured Logging for Various .NET Platforms
StackExchange/StackExchange.Redis
General purpose redis client
nissl-lab/npoi
a .NET library that can read/write Office formats without Microsoft Office installed. No COM+, no interop.
Version Downloads Last updated
5.3.0 9,602,774 10/28/2024
5.1.0 33,577,459 9/11/2023
5.0.0 12,539,087 2/12/2023
4.4.0 13,165,412 7/10/2022
4.3.0 11,952,000 1/24/2022
4.2.2 28,064,877 6/13/2020
4.2.1 15,786,614 7/15/2019
4.2.0 2,440,125 5/19/2019
4.1.0 932,243 5/5/2019
4.0.0 3,769,192 1/30/2019
3.1.0 13,898,674 10/27/2017
3.0.1 498,949 10/8/2017
2.0.3 10,155,881 4/25/2017
1.10.0 3,964,324 3/22/2016
1.9.2 1,483,358 10/22/2015
1.9.1 526,960 9/30/2015
1.8.2 1,120,474 5/29/2015
1.8.1 943,177 12/26/2014
1.8.0 155,763 11/11/2014
1.7.2 631,340 3/4/2014
1.7.1 226,929 1/16/2014
1.7.0 45,798 1/3/2014
1.6.1 302,740 6/30/2013
1.6.0 158,684 4/19/2013
1.5.0 364,599 1/25/2013
1.4.3 73,694 8/15/2012
1.4.2 30,556 7/1/2012
1.4.1 5,704 6/28/2012
1.4.0 55,762 5/4/2012
1.3.0 45,783 11/22/2011
1.2.1 11,116 10/10/2011
1.2.0 5,989 9/29/2011
1.1.0 47,360 5/21/2011
1.0.0 84,104 5/17/2011