CheckOps
FakeItEasy
FakeItEasy is an MIT-licensed .NET dynamic fake library for creating fakes, mocks and stubs with a context-aware fluent interface, compatible with C# and VB.NET.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
FakeItEasy simplifies .NET test doubles: all fake objects are just fakes, and how you use them determines whether they act as mocks or stubs. A context-aware fluent interface guides you, and it works with both C# and VB.NET.
Configuring and asserting use the same syntax: A.CallTo(() => shop.GetTopSellingCandy()).Returns(lollipop) sets behaviour, and A.CallTo(() => shop.BuyCandy(lollipop)).MustHaveHappened() verifies it. Every faked instance looks and feels like the faked type, so tests read like ordinary code.
The source code is at FakeItEasy/FakeItEasy on GitHub under the MIT licence, with about 1,900 stars; the most recent commit was on 26 October 2026.
A good habit with any mocking library is to fake only what you own and keep fakes close to the test that uses them. When a test needs many configured fakes, that is usually a sign the class under test has too many dependencies.
Features
- Unified fakes: No mock versus stub ceremony.
- Fluent interface: Context-aware guidance.
- Same syntax for setup and assert: Easy to read.
- C# and VB.NET: Full compatibility.
Pros
- Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 26 October 2026.
Cons
- Interface and virtual members: Like other dynamic proxies, cannot fake sealed members.
Usage and Links (Example)
var shop = A.Fake<ICandyShop>();
A.CallTo(() => shop.GetTopSellingCandy()).Returns(lollipop);
// exercise the system under test
A.CallTo(() => shop.BuyCandy(lollipop)).MustHaveHappened();
Resources:
Pricing
FakeItEasy is free and open source under the MIT licence.
Recommended for?
- .NET teams wanting a simple, mature mocking library.
Conclusion
FakeItEasy is a clean, long-lived alternative to Moq and NSubstitute.
Its single-syntax design reads well in code review.
On CheckOps, FakeItEasy is filed under the Unit testing stage. Related tools listed here include Moq, NSubstitute, xUnit.net, NUnit, Fluent Assertions and Shouldly. Which one fits best depends mostly on your stack, your team’s size and skills, and whether you prefer to run tools yourself or pay for a managed service. This page reflects the official website, documentation and repository as they stood on 11 November 2026.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with FakeItEasy side by side.
MMoqMoq is a popular MIT-licensed mocking library for .NET that uses lambda expressions to set up and verify mocks; stable v4.x is maintained on the v4 branch while the main branch hosts the upcoming v5.Compare with FakeItEasy
NNSubstituteNSubstitute is a BSD-3-Clause mocking library for .NET with a concise, readable syntax for creating substitutes, configuring returns and checking received calls.Compare with FakeItEasy
XxUnit.netxUnit.net is a free, Apache-2.0, community-focused unit testing tool for C#, F# and Visual Basic, part of the .NET Foundation; v3 supports .NET 8+ and .NET Framework 4.7.2+.Compare with FakeItEasy
NNUnitNUnit is an MIT-licensed unit-testing framework for all .NET languages on Windows, macOS and Linux, broad and non-opinionated, now at version 5 after NUnit 3 and 4.Compare with FakeItEasy
FFluent AssertionsFluent Assertions is a .NET assertions library with natural-language `Should()` syntax; versions 8 and later are free for open-source and non-commercial use but require a paid licence (via Xceed) for commercial use.Compare with FakeItEasy
SShouldlyShouldly is a BSD-3-Clause .NET assertion library focused on readable code and great failure messages that include the source expression being tested.Compare with FakeItEasy