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 1 8/29/2024
8.2.0 1 4/12/2024
8.1.0 2 3/5/2024
8.0.1 0 12/26/2023
8.0.0 0 11/7/2023
7.4.0 3 5/11/2023
7.3.1 2 2/12/2023
7.3.0 0 1/17/2022
7.2.0 0 9/1/2021
7.1.0 0 6/7/2021
7.0.2 1 8/30/2024
7.0.1 0 3/30/2021
7.0.0 0 3/15/2021
6.2.1 0 9/2/2020
6.2.0 1 8/30/2024
6.1.0 0 6/8/2020
6.0.1 0 4/10/2020
6.0.0 0 1/17/2020
5.5.0 0 11/25/2019
5.4.1 0 11/14/2019
5.4.0 0 10/23/2019
5.3.0 0 10/16/2019
5.2.0 0 9/5/2019
5.1.2 0 8/30/2019
5.1.1 0 4/15/2019
5.1.0 0 2/11/2019
5.0.1 0 1/14/2019
5.0.0 0 1/7/2019
4.9.2 0 12/13/2018
4.9.1 0 9/28/2018
4.9.0 0 9/27/2018
4.8.1 1 4/12/2024
4.8.0 0 8/8/2018
4.7.1 0 7/6/2018
4.7.0 0 7/3/2018
4.6.0 0 5/14/2018
4.5.1 0 2/28/2018
4.5.0 0 2/19/2018
4.4.0 0 2/6/2018
4.3.0 0 12/6/2017
4.2.0 0 11/8/2017
4.1.1 0 10/18/2017
4.1.0 0 10/10/2017
4.0.0 0 7/27/2017
3.4.2 0 6/19/2017
3.4.1 0 6/15/2017
3.3.2 0 5/4/2017
3.3.1 0 5/4/2017
3.3.0 0 5/4/2017
3.2.0 0 4/5/2017
3.1.0 0 3/10/2017
3.0.0 0 2/22/2017
2.3.3 0 1/18/2017
2.3.2 0 12/14/2016
2.3.1 0 9/30/2016
2.3.0 0 9/26/2016
2.2.0 0 7/14/2016
2.1.0 0 6/20/2016
2.0.0 0 5/25/2016
1.25.3 0 7/24/2015
1.24.0 0 8/25/2014
1.23.0 1 8/30/2024
1.22.0 0 6/17/2014
1.21.0 0 5/28/2014
1.20.0 0 5/6/2014
1.19.0 0 4/15/2014
1.18.0 0 3/5/2014
1.17.0 0 1/14/2014
1.16.0 0 1/9/2014
1.15.0 0 12/11/2013
1.14.0 1 8/27/2024
1.13.1 0 7/30/2013
1.12.0 0 5/27/2013
1.11.0 0 5/6/2013
1.10.0 0 3/28/2013
1.9.1 0 3/6/2013
1.8.0 0 2/12/2013
1.7.4626.65 0 8/31/2012
1.7.4582.63 0 7/18/2012
1.7.4574.62 0 7/10/2012
1.7.4507.61 0 5/4/2012
1.7.4257.42 0 8/28/2011
1.7.4166.27 1 5/25/2024
1.7.4117.2 0 4/10/2011
1.7.4109.1 0 4/2/2011
1.6.4075.221 0 3/1/2011
1.6.4062.205 0 2/14/2011
1.5.3970.199 0 1/7/2011
1.0.0.5 0 1/7/2011