FakeItEasy 8.3.0

Are you mocking me?

NuGet version Build status

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


FakeItEasy logo designed by Vanja Pakaski.

No packages depend on FakeItEasy.

https://github.com/FakeItEasy/FakeItEasy/releases

.NET Framework 4.6.2

.NET 6.0

.NET 8.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
8.3.0 42 06/20/2024
8.2.0 42 04/13/2024
8.1.0 45 02/23/2024
8.0.1 36 12/30/2023
8.0.0 41 11/15/2023
8.0.0-alpha.1.10 40 07/28/2023
8.0.0-alpha.1 70 06/30/2023
7.4.0 44 07/03/2023
7.3.1 60 07/05/2022
7.3.0 48 01/31/2023
7.2.0 50 01/31/2023
7.1.0 54 06/25/2023
7.0.2 45 06/30/2023
7.0.1 40 06/27/2023
7.0.0 52 06/30/2023
6.2.1 50 05/12/2023
6.2.0 43 12/16/2022
6.1.0 43 08/30/2022
6.0.1 45 07/01/2023
6.0.0 49 01/01/2023
5.5.0 51 01/31/2023
5.4.1 52 09/16/2022
5.4.0 40 06/28/2023
5.3.0 48 07/01/2023
5.2.0 45 01/31/2023
5.1.2 50 06/06/2023
5.1.1 39 07/02/2023
5.1.0 44 05/27/2023
5.0.1 51 05/27/2023
5.0.0 49 06/27/2023
4.9.2 52 08/19/2022
4.9.1 44 06/27/2023
4.9.0 42 05/17/2023
4.8.1 39 06/27/2023
4.8.0 70 06/27/2023
4.7.1 50 07/01/2023
4.7.0 49 07/03/2023
4.6.0 48 05/15/2023
4.5.1 45 06/27/2023
4.5.0 51 07/04/2023
4.4.0 52 06/15/2023
4.3.0 45 01/31/2023
4.2.0 44 06/24/2023
4.1.1 44 06/29/2023
4.1.0 40 07/01/2023
4.0.0 45 03/14/2023
3.4.2 45 06/27/2023
3.4.1 52 03/19/2023
3.3.2 43 12/18/2022
3.3.1 48 07/02/2023
3.3.0 52 08/05/2022
3.2.0 45 01/31/2023
3.1.0 48 05/08/2023
3.0.0 47 01/31/2023
2.3.3 43 01/31/2023
2.3.2 51 07/02/2023
2.3.1 46 05/18/2023
2.3.0 51 01/04/2023
2.2.0 49 04/21/2023
2.1.0 50 07/04/2023
2.0.0 48 07/03/2023
1.25.3 45 06/29/2023
1.24.0 39 01/31/2023
1.23.0 46 01/31/2023
1.22.0 47 01/31/2023
1.21.0 47 06/09/2023
1.20.0 46 03/24/2023
1.19.0 44 07/02/2023
1.18.0 50 05/10/2023
1.17.0 49 09/29/2022
1.16.0 40 06/27/2023
1.15.0 52 11/13/2022
1.14.0 48 06/28/2023
1.13.1 36 07/02/2023
1.12.0 46 09/29/2022
1.11.0 46 09/25/2022
1.10.0 51 02/09/2023
1.9.1 34 07/01/2023
1.8.0 49 01/31/2023
1.7.4626.65 50 01/31/2023
1.7.4582.63 43 07/04/2023
1.7.4574.62 68 01/31/2023
1.7.4507.61 44 01/31/2023
1.7.4257.42 41 08/08/2022
1.7.4166.27 47 06/29/2023
1.7.4117.2 37 11/05/2022
1.7.4109.1 40 07/02/2023
1.6.4075.221 40 07/01/2023
1.6.4062.205 40 01/31/2023
1.5.3970.199 43 01/31/2023
1.0.0.5 48 01/31/2023