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