FakeItEasy 8.3.0
dotnet add package FakeItEasy --version 8.3.0
NuGet\Install-Package FakeItEasy -Version 8.3.0
<PackageReference Include="FakeItEasy" Version="8.3.0" />
paket add FakeItEasy --version 8.3.0
#r "nuget: FakeItEasy, 8.3.0"
// Install FakeItEasy as a Cake Addin #addin nuget:?package=FakeItEasy&version=8.3.0 // Install FakeItEasy as a Cake Tool #tool nuget:?package=FakeItEasy&version=8.3.0
A .NET dynamic fake library for creating all types of fake objects, mocks, stubs etc.
- Easier semantics, all fake objects are just that - fakes - the use of the fakes determines whether they're mocks or stubs.
- Context-aware fluent interface guides the developer.
- Designed for ease of use.
- Full compatibility with both C# and VB.Net.
Faking amazing example
// Creating a fake object is very easy!
// No mocks, or stubs; everything's a fake.
var shop = A.Fake<ICandyShop>();
// Easily set up a call to return a value.
var lollipop = new Lollipop();
A.CallTo(() => shop.GetTopSellingCandy()).Returns(lollipop);
// Exercise your system under test by using the fake as you
// would an instance of the faked type.
var customer = new SweetTooth();
customer.BuyTastiestCandy(shop);
// Asserting uses the same syntax as configuring calls.
A.CallTo(() => shop.BuyCandy(lollipop)).MustHaveHappened();
Resources
- Website
- Quickstart
- Documentation
- Chat
- NuGet packages on NuGet.org, targeting:
- .NET Framework 4.6.2
- .NET Standard 2.0
- .NET Standard 2.1
- .NET 6.0
FakeItEasy logo designed by Vanja Pakaski.
Product | Versions 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 is compatible. 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. |
.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 is compatible. |
.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. |
-
.NETFramework 4.6.2
- Castle.Core (>= 5.1.1)
-
.NETStandard 2.0
- Castle.Core (>= 5.1.1)
-
.NETStandard 2.1
- Castle.Core (>= 5.1.1)
-
net6.0
- Castle.Core (>= 5.1.1)
-
net8.0
- Castle.Core (>= 5.1.1)
NuGet packages (165)
Showing the top 5 NuGet packages that depend on FakeItEasy:
Package | Downloads |
---|---|
AutoFixture.AutoFakeItEasy
This extension turns AutoFixture into an Auto-Mocking Container. The mock instances are created by FakeItEasy. To use it, add the AutoFakeItEasyCustomization to your Fixture instance. |
|
FakeXrmEasy.9
Utilities to streamline unit testing in Dynamics CRM 365 by faking the IOrganizationService against an In-Memory context which runs blazing fast. |
|
MockQueryable.FakeItEasy
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. |
|
Autofac.Extras.FakeItEasy
Autofac extension supporting generation of FakeItEasy objects. |
|
OBeautifulCode.AutoFakeItEasy
Makes FakeItEasy Dummies useful by wiring-them-up to real-looking, random test data. Leverages the power of AutoFixture to create anonymous variables. Fixes some of AutoFixture's poor default behaviors. Makes unit tests more expressive with less lines of code. |
GitHub repositories (94)
Showing the top 5 popular GitHub repositories that depend on FakeItEasy:
Repository | Stars |
---|---|
NancyFx/Nancy
Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono
|
|
quartznet/quartznet
Quartz Enterprise Scheduler .NET
|
|
danielgerlag/workflow-core
Lightweight workflow engine for .NET Standard
|
|
dotnet/msbuild
The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
|
|
FastEndpoints/FastEndpoints
A light-weight REST API development framework for ASP.NET 6 and newer.
|
Version | Downloads | Last updated |
---|---|---|
8.3.0 | 1,546,480 | 6/20/2024 |
8.2.0 | 974,047 | 4/10/2024 |
8.1.0 | 1,514,849 | 1/5/2024 |
8.0.1 | 99,891 | 12/26/2023 |
8.0.0 | 642,405 | 11/7/2023 |
7.4.0 | 2,776,642 | 4/23/2023 |
7.3.1 | 6,887,379 | 3/8/2022 |
7.3.0 | 1,214,059 | 1/17/2022 |
7.2.0 | 2,218,909 | 9/1/2021 |
7.1.0 | 1,237,906 | 6/7/2021 |
7.0.2 | 477,861 | 5/4/2021 |
7.0.1 | 555,914 | 3/30/2021 |
7.0.0 | 320,306 | 3/15/2021 |
6.2.1 | 3,538,607 | 9/2/2020 |
6.2.0 | 628,371 | 7/23/2020 |
6.1.0 | 1,094,085 | 6/8/2020 |
6.0.1 | 872,415 | 4/10/2020 |
6.0.0 | 2,814,183 | 1/17/2020 |
5.5.0 | 1,768,903 | 11/25/2019 |
5.4.1 | 137,277 | 11/14/2019 |
5.4.0 | 317,099 | 10/23/2019 |
5.3.0 | 92,381 | 10/16/2019 |
5.2.0 | 667,813 | 9/5/2019 |
5.1.2 | 131,715 | 8/30/2019 |
5.1.1 | 1,625,632 | 4/15/2019 |
5.1.0 | 1,048,900 | 2/11/2019 |
5.0.1 | 264,515 | 1/14/2019 |
5.0.0 | 109,260 | 1/7/2019 |
4.9.2 | 264,211 | 12/13/2018 |
4.9.1 | 1,049,037 | 9/28/2018 |
4.9.0 | 880,829 | 9/27/2018 |
4.8.1 | 249,294 | 9/4/2018 |
4.8.0 | 274,493 | 8/8/2018 |
4.7.1 | 729,473 | 7/6/2018 |
4.7.0 | 28,323 | 7/3/2018 |
4.6.0 | 987,279 | 5/14/2018 |
4.5.1 | 668,699 | 2/28/2018 |
4.5.0 | 158,174 | 2/19/2018 |
4.4.0 | 135,901 | 2/6/2018 |
4.3.0 | 293,071 | 12/6/2017 |
4.2.0 | 237,391 | 11/8/2017 |
4.1.1 | 75,929 | 10/18/2017 |
4.1.0 | 98,781 | 10/10/2017 |
4.0.0 | 518,395 | 7/27/2017 |
3.4.2 | 229,142 | 6/19/2017 |
3.4.1 | 297,124 | 6/15/2017 |
3.3.2 | 190,236 | 5/4/2017 |
3.3.1 | 4,728 | 5/4/2017 |
3.3.0 | 6,075 | 5/4/2017 |
3.2.0 | 1,213,466 | 4/5/2017 |
3.1.0 | 96,630 | 3/10/2017 |
3.0.0 | 137,437 | 2/22/2017 |
2.3.3 | 200,021 | 1/18/2017 |
2.3.2 | 88,636 | 12/14/2016 |
2.3.1 | 326,019 | 9/30/2016 |
2.3.0 | 27,283 | 9/26/2016 |
2.2.0 | 201,247 | 7/14/2016 |
2.1.0 | 120,858 | 6/20/2016 |
2.0.0 | 212,473 | 5/25/2016 |
1.25.3 | 826,717 | 7/24/2015 |
1.24.0 | 99,676 | 8/25/2014 |
1.23.0 | 14,468 | 8/7/2014 |
1.22.0 | 57,605 | 6/17/2014 |
1.21.0 | 26,669 | 5/28/2014 |
1.20.0 | 12,582 | 5/6/2014 |
1.19.0 | 21,036 | 4/15/2014 |
1.18.0 | 101,104 | 3/5/2014 |
1.17.0 | 98,980 | 1/14/2014 |
1.16.0 | 5,985 | 1/9/2014 |
1.15.0 | 14,503 | 12/11/2013 |
1.14.0 | 31,606 | 10/24/2013 |
1.13.1 | 40,164 | 7/30/2013 |
1.12.0 | 19,536 | 5/27/2013 |
1.11.0 | 10,197 | 5/6/2013 |
1.10.0 | 12,638 | 3/28/2013 |
1.9.1 | 14,799 | 3/6/2013 |
1.8.0 | 40,796 | 2/12/2013 |
1.7.4626.65 | 35,730 | 8/31/2012 |
1.7.4582.63 | 11,029 | 7/18/2012 |
1.7.4574.62 | 4,966 | 7/10/2012 |
1.7.4507.61 | 11,777 | 5/4/2012 |
1.7.4257.42 | 22,572 | 8/28/2011 |
1.7.4166.27 | 13,132 | 5/29/2011 |
1.7.4117.2 | 6,554 | 4/10/2011 |
1.7.4109.1 | 312,075 | 4/2/2011 |
1.6.4075.221 | 7,592 | 3/1/2011 |
1.6.4062.205 | 7,087 | 2/14/2011 |
1.5.3970.199 | 7,777 | 1/7/2011 |
1.0.0.5 | 32,831 | 1/7/2011 |