NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet, #717 most downloaded on NuGet
It's faking amazing! The easy mocking library for .NET that works great in C# and VB.NET alike. No need to know the difference between a stub, a mock or a spy, everything's a fake! The easy to use, refactoring friendly API makes faking a breeze.
Latest stable
9.0.1
Last release 10 months ago
24 Jan 2026
Release timing varies
gaps range from 9 days to 1.6 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
34 versions withdrawn
withdrawn after publishing
127 years old
125 releases · first in 1900
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
WithNonVoidReturnType matches methods with void return type
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Ignored/That argument constraints do not Work for ByRef-Arguments in VisualBasic (#899 via #947 )
Ignored/That argument constraints do not Work for ByRef-Arguments in VisualBasic (#899 via #947 )Reverted #477, which introduced an unintended breaking change
Faked classes implement all interfaces, including explicitly-implemented members
NullReferenceException when calling a method that returns a value type and has been configured with DoesNothing (#806)InvalidOperationException when using Throws, CallsBaseMethod, or DoesNothing to configure void method on unnatural fake (#832)TargetInvocationException instead of the original exception (#836)Better exception message when configuring/asserting a non-fake object
Non-generic Fake and Dummy creation - Sdk.Create.Fake, Sdk.Create.Dummy, Sdk.Create.CollectionOfFake and Sdk.Create.CollectionOfDummy.
Sdk.Create.Fake, Sdk.Create.Dummy, Sdk.Create.CollectionOfFake and Sdk.Create.CollectionOfDummy. (#482)A.CollectionOfFake. (#755)WithNonVoidReturnType method to allow configuration of the return value for any return type. (#648)using static FakeItEasy.A in unused call specifications. (#742)UnusedReturnValueAnalyzer when encountering an invocation that's not a member access. (#731)This major release of FakeItEasy comes jam packed with new features, improvements and bug fixes.
This major release of FakeItEasy comes jam packed with new features, improvements and bug fixes.
Notably, a lot of work has gone into making FakeItEasy 2.0.0 thread-safe, for running tests in parallel, which is the default behavior of some of the latest versions of popular test frameworks such as xUnit.net. We're also excited about the simpler and more powerful API for configuring events. Now and Go are gone, and you can now raise events of any type (an often requested feature). The API as a whole has been streamlined significantly with many redundant features removed, inappropriate members hidden from Intellisense, and support for legacy platforms (.NET 3.5, Silverlight) removed. For full details of all changes in 2.0, see below.
Oh, we've also created a Roslyn Analyzer! The first diagnostic we've added warns you if you've made a call specification, e.g. A.CallTo(() => foo.Bar()) and then haven't done anything with it, e.g. .Returns(42). Look out for more diagnostics and code fixes to come!
<img src="https://cloud.githubusercontent.com/assets/677704/15441357/b04fc892-1eda-11e6-86a1-e41ecc4348eb.png" height="111" width="756" alt="image">
We hope you enjoy using FakeItEasy 2.x as much as we've enjoyed building it!
Get the new release and the analyzer from NuGet now!
Raising custom event handler events now require a typeparam (but neither Now nor Go). (#30)
For example:
public delegate void CustomEventHandler(object sender, CustomEventArgs e);
…
event CustomEventHandler CustomEvent;
…
fake.CustomEvent += Raise.With<CustomEventHandler>(fake, sampleCustomEventArgs);
To avoid this requirement, make CustomEvent an EventHandler<CustomEventArgs>.
Passing a null sender to Raise.With now raises an event with a null sender. Use Raise.With(TEventArgs) to raise with the Fake as the sender. (#395)
The old IFakeOptionsBuilder interface is now named IFakeOptions. A new IFakeOptionsBuilder interface was created to provide implicit fake configuration at time of creation. (#520, #461)
IFakeOptionsBuilder replaces IFakeConfigurator. IFakeOptionsBuilder is more flexible, and implementations can provide implicit creation options for multiple types of fakes. The interface has changed as well, allowing any of the fake creation options to be applied implicitly. (#402, #520):
Priority Priority { get; }
bool CanBuildOptionsForFakeOfType(Type type);
void BuildOptions(Type typeOfFake, IFakeOptions options);
Fakes' methods act the same during fake creation as after. They return the same results, calls to them show up in MustHaveHappened, and they are subject to configuration during fake construction via explicit fake creation options or implicit fake creation options. (#371)
Fake creation option OnFakeCreated has been renamed to ConfigureFake to reflect that its effects are active during fake creation. (#454)
Fake creation options now have more predictable interactions (#467):
WithAdditionalAttributes stacks instead of overriding previous callsWrapping overrides CallsBaseMethods, Strict, and ConfigureFake, on the principle of "last action in wins"IDummyDefinition and DummyDefinition<T> have been renamed to IDummyFactory and DummyFactory<T>. The factories are now more powerful, able to create more Dummy types from a single factory type, as the interface has changed. (#402, #441):
bool CanCreate(Type);
object Create(Type);
Priority Priority {get};
Unconfigured get properties now return a Dummy, rather than trying to make a Fake first. This matches unconfigured methods' behaviour. (#156)
Unconfigured methods that return Lazy or Task of a non-Dummyable type now return a concrete Lazy or Task of the default value for the parameterized type, instead of a Fake Lazy or Task. (#560)
Ordered assertions are made using a new API. (#637):
A.CallTo(() => unitOfWorkFactory.BeginWork()).MustHaveHappened()
.Then(A.CallTo(() => usefulCollaborator.JustDoIt()).MustHaveHappened())
.Then(A.CallTo(() => unitOfWork.Dispose()).MustHaveHappened());
IArgumentValueFormatter, IDummyFactory, and IFakeOptionsBuilder have all had their Priority member changed to be a new type, Priority, which can only be constructed with values 0–255, with a special member Priority.Default equivalent to a priority of 0.
ArgumentCollection, IRepeatSpecification, and Raise have moved to the FakeItEasy.Configuration namespace. There should be no need to access these except as return values from API methods. (#432)
The IHideObjectMembers API support interface was moved to the FakeItEasy namespace. (#585)
Now and Go, formerly used when raising events. (#30)Any and Configure types. Also the FakeItEasy.ExtensionSyntax namespace, which provided fake.Configure().CallsTo(…),
fake.CallsTo(…). Use A.CallTo(…) instead. (#408, #410)A.Equals, A.ReferenceEquals, Fake.Equals, Fake.ReferenceEquals. Use corresponding methods on object instead. (#425)ArgumentCollection.Empty (and class's constructors), ITypeCatalogue, TypeCatalogue, FakeManager.Factory and FakeManager's constructor, ICallCollectionAndCallMatcherAccessor, ICallMatcher, ICallMatcherAccessor, ProxyGeneratorResult. All known uses for these were internal to the
library. (#428)IFakeObjectCallRuleWithDescription. No known uses. (#410)ConditionalWeakTable, InheritedExportAttribute, ImportManyAttribute, and Tuple classes, as well as the
Zip and FirstFromEachKey enumerable extension methods. These were always intended for internal use only. (#565)IFakeObjectContainer, IFakeObjectOptionsBuilder, DelegateFakeObjectContainer, DynamicContainer, NullFakeObjectContainer, and Fake Scope creation methods that allowed the user to supply an IFakeObjectContainer. (#603)IFakeScope, Fake.CreateScope. Fake Scopes are no longer supported. (#604)NextCall is no longer supported, and has been removed. As a result, IInterceptedFakeObjectCall.DoNotRecordCall, and IWritableFakeObjectCall provided no value and have been removed. (#642)gets even when the property type is not fakeable. (#312)NullReferenceException when trying to fake a non-virtual generic method method. (#480)AssignsOutAndRefParameters now works properly with faked delegates. (#677)Lazy<T> values now default to having a value (which is a Dummy of type T). (#358)Implements now has a generic overload: Implements<IAmAnInterface>(). (#470)That.Matches or Ignored argument constraints. (#476)ArgumentValueFormatter. (#500)Implements fake creation option throws an exception when passed a non-interface. (#462)That and IFakeOptions<T> hide members inherited from object, making for a better fluent syntax. (#580, #583)A<T>.That, A<T>.Ignored, and A<T>._, throw an exception when invoked outside of A.CallTo. (#559)A.CallToSet with a read-write property to configure the setter. (#175)A.CollectionOfDummy<T>() to create a collection of dummies. (#675)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed: [Out] method parameters treated like out parameters, so methods can't be configured - #508
out parameters, so methods can't be configured - #508Thanks to @RichardLangFromNZ for raising the issue.
Fixed: Cannot fake types implementing IDisposable - #440
IDisposable - #440With special thanks for contributions to this release from:
Fixed: Raise.With(…).Now is incorrectly marked obsolete - #383
Raise.With(…).Now is incorrectly marked obsolete - #383With special thanks for contributions to this release from:
New: Now and Go are no longer needed when raising events, and have been marked obsolete - #359
Now and Go are no longer needed when raising events, and have been marked obsolete - #359With special thanks for contributions to this release from:
New: Added CallsBaseMethods option to fake creation - #192
With special thanks for contributions to this release from:
New: Implicit assignment of out parameters, no need for AssignsOutAndRefParameters - #220
With special thanks for contributions to this release from:
New: Provide a Lazy version of AssignOutAndRefParameters - #319
With special thanks for contributions to this release from:
New: Default implementation of faked parameterized properties (VB.Net only) and indexer properties now work just like "regular" properties - #293, #27
With special thanks for contributions to this release from:
New: Updated to Castle.Core 3.3.0 - #299
With special thanks for contributions to this release from:
Changed: Improved startup times by having default bootstrapper now only scan current AppDomain for extensions - #268
ReturnsNextFromSequence behvavior after the sequence is exhausted - #273With special thanks for contributions to this release from:
New: Client-supplied bootstrappers can override the default behaviour when scanning assemblies for extensions - #130
With special thanks for contributions to this release from:
New: Upgrade to Castle.Core 3.2.2 - #236
New: Support for Windows Store test projects - #214
With special thanks for contributions to this release from:
New: Better handling of ReturnsLazily, Throws, and Invokes convenience methods when used with out and ref parameters - #168
ReturnsLazily, Throws, and Invokes convenience methods when used with out and ref parameters - #168Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.