NSubstitute
4.3.0
Prefix Reserved
Install-Package NSubstitute -Version 4.3.0
dotnet add package NSubstitute --version 4.3.0
<PackageReference Include="NSubstitute" Version="4.3.0" />
paket add NSubstitute --version 4.3.0
#r "nuget: NSubstitute, 4.3.0"
// Install NSubstitute as a Cake Addin
#addin nuget:?package=NSubstitute&version=4.3.0
// Install NSubstitute as a Cake Tool
#tool nuget:?package=NSubstitute&version=4.3.0
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 | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows |
.NET Core | netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1 |
.NET Framework | net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen30 tizen40 tizen60 |
Universal Windows Platform | uap uap10.0 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETFramework 4.5
- Castle.Core (>= 4.4.1)
- System.Threading.Tasks.Extensions (>= 4.3.0)
-
.NETFramework 4.6
- Castle.Core (>= 4.4.1)
- System.Threading.Tasks.Extensions (>= 4.3.0)
-
.NETStandard 1.3
- Castle.Core (>= 4.4.1)
- NETStandard.Library (>= 1.6.1)
- System.Linq.Queryable (>= 4.3.0)
- System.Reflection.TypeExtensions (>= 4.3.0)
- System.Threading.Tasks.Extensions (>= 4.3.0)
-
.NETStandard 2.0
- Castle.Core (>= 4.4.1)
- System.Threading.Tasks.Extensions (>= 4.3.0)
-
net5.0
- Castle.Core (>= 4.4.1)
-
net6.0
- Castle.Core (>= 4.4.1)
NuGet packages (146)
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. |
|
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 (263)
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).
|
|
dotnet/orleans
Cloud Native application framework for .NET
|
|
abpframework/abp
Open Source Web Application Framework for ASP.NET Core
|
Version | Downloads | Last updated |
---|---|---|
4.3.0 | 1,235,630 | 1/24/2022 |
4.2.2 | 13,831,341 | 6/13/2020 |
4.2.1 | 10,073,327 | 7/15/2019 |
4.2.0 | 1,781,728 | 5/19/2019 |
4.1.0 | 566,389 | 5/5/2019 |
4.0.0 | 2,743,926 | 1/30/2019 |
4.0.0-rc1 | 82,753 | 11/19/2018 |
3.1.0 | 9,656,001 | 10/27/2017 |
3.0.1 | 429,181 | 10/8/2017 |
2.0.3 | 4,668,334 | 4/25/2017 |
2.0.1-rc | 149,448 | 12/17/2016 |
2.0.0-rc | 162,017 | 8/7/2016 |
1.10.0 | 2,969,139 | 3/22/2016 |
1.9.2 | 1,094,710 | 10/22/2015 |
1.9.1 | 355,190 | 9/30/2015 |
1.8.2 | 874,715 | 5/29/2015 |
1.8.1 | 628,969 | 12/26/2014 |
1.8.0 | 112,391 | 11/11/2014 |
1.7.2 | 481,425 | 3/4/2014 |
1.7.1 | 206,778 | 1/16/2014 |
1.7.0 | 37,577 | 1/3/2014 |
1.6.1 | 240,977 | 6/30/2013 |
1.6.0 | 87,909 | 4/19/2013 |
1.5.0 | 273,513 | 1/25/2013 |
1.4.3 | 61,140 | 8/15/2012 |
1.4.2 | 24,515 | 7/1/2012 |
1.4.1 | 3,061 | 6/28/2012 |
1.4.0 | 22,770 | 5/4/2012 |
1.3.0 | 40,048 | 11/22/2011 |
1.2.1 | 5,900 | 10/10/2011 |
1.2.0 | 3,682 | 9/29/2011 |
1.1.0 | 33,985 | 5/21/2011 |
1.0.0 | 39,989 | 5/17/2011 |
0.9.5 | 3,805 | 1/7/2011 |
0.9.0.34 | 18,808 | 1/7/2011 |