NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet
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.
Unintended breaking change with IsSameSequenceAs
IsSameSequenceAs (#2084)⚠️ Breaking change : the signature of IsSameSequenceAs has changed. It now has 2 generic type parameters, and accepts an optional equality comparer. T…
IsSameSequenceAs has changed. It now has 2 generic type parameters, and accepts an optional equality comparer. This is a binary-level breaking change, and possibly a source-level breaking change, but we don't expect most users to be affected, since the generic type arguments are typically inferred by the compiler (#1913)Fake.ClearConfiguration (#1768)
Use Fake.Reset instead.HasSameElementsAs argument matcher that compares IEnumerable elements without regard to their order (#1913)IsSameSequenceAs now accepts an optional equality comparer (#1913)Your coding agent can read these notes before it upgrades. Set up the MCP server →
Faking delegates now about 25 times faster due to DynamicProxy's CreateDelegateToMixin
CreateDelegateToMixin (#2013)ArgumentNullException (#2033)in parameters works on .NET 6 and higher (#1382)A.CallTo with methods whose arguments include anonymous types (#1593)InternalsVisibleTo from project files (#2027)Fake.Reset replaces Fake.ClearConfiguration as the preferred mechanism to clear existing fakes' configuration. (#1839) Resets all changes made to the
Fake.Reset replaces Fake.ClearConfiguration as the preferred mechanism to clear existing fakes' configuration. (#1839)
Resets all changes made to the fake after it was created.EventRule between Fakes (#1993)Provide a mechanism for capturing arguments passed to Fakes (#1950): ```c# var capturedMessage = A.Captured ();
var capturedMessage = A.Captured<string>();
var logger = A.Fake<IListLogger>();
A.CallTo(() => logger.Log(capturedMessage._, An<IEnumerable<int>>._)).DoesNothing();
var calculator = new Calculator(logger);
calculator.Add([1, 2, 3, 4]);
calculator.Square(7);
capturedMessage.Values.Should().Equal("about to add", "about to square");
DoesNothing and implicit creation options throws ArgumentException
DoesNothing and implicit creation options throws ArgumentException (#1976)This is technically a breaking change, but it's pretty unlikely that anyone was relying on the old behavior. Only if someone were passing an enumerabl…
Upgrade Castle.Core to 5.1.1 (#1925)
Match enumerable arguments by comparing contents rather than via Equals (#1960)
This is technically a breaking change, but it's pretty unlikely that anyone was relying on the old behavior. Only if someone were passing an enumerable to a call specification and either
would it be an unwelcome surprise.
ArgumentEqualityComparer<T> or implementing IArgumentEqualityComparer. Learn more at Custom Argument Equality.in parameter (#1948)Ensure anonymous parameters are handled and displayed correctly in all cases
NullReferenceException thrown when attempting to build unmet expectation message that includes an anonymous parameter (#1920)ArgumentCollection.ArgumentNames has type IEnumerable<string> but may contain nulls (#1922)MustHaveHappend → MustHaveHappened (#1904)https://github.com/FakeItEasy/FakeItEasy/compare/7.3.1....7.4.0
CallsWrappedMethod doesn't add a call rule, so will not override Strict configuration
CallsWrappedMethod doesn't add a call rule, so will not override Strict configuration (#1870)Full Changelog: https://github.com/FakeItEasy/FakeItEasy/compare/7.3.0...7.3.1
Indicate Fake name (if defined) in failing assertions
Improve speed of Object method comparisons when applying default Fake rules
Add CollectionOfFake overload that accepts an action that uses fake number to configure fake (#1838) `c# A.CollectionOfFake (count, (options, i) => op
A.CollectionOfFake<ICollectionItem>(count, (options, i) => options.Named($"Item{i}")));
Sdk.Create.CollectionOfFake(typeof(ICollectionItem), count, (options, i) => options.Named($"Item{i}"));
A.CallTo(fake, EventAction.Add("EventName")) // Configure subscription to a specific event
A.CallTo(fake, EventAction.Remove("EventName")) // Configure unsubscription from a specific event
A.CallTo(fake, EventAction.Add()) // Configure subscription to any event
A.CallTo(fake, EventAction.Remove()) // Configure unsubscription from any event
Manage.Event("FellInLove").Of(robot);
Manage.AllEvents.Of(robot);
var fake = A.Fake<IFoo>(o => o.Strict(StrictFakeOptions.ManageEvents));
Implicit creation options are ignored for dummy fakes
Using Argument constraints that have a parameter node with an unnatural Fake throws "Exception: Argument types do not match"
Registering a handler on a fake Wrapping an event does not work (#1795) Registering the handler will now work. This introduced a minor change on how e
EqualTo overload with equality comparer (#1810)An for argument constraints (#1819)GetAssemblyFileNamesToScanForExtensions method, if they reference FakeItEasyInvokes and no additional member configuration (#1812):
Previously DoesNothing would be required in the chain, soA.CallTo(() => fake.Method()).Invokes(…).DoesNothing().Once()
can now be writtenA.CallTo(() => fake.Method()).Invokes(…).Once()
is not null pattern to is object tests (#1796)TypeCatalogueInstanceProvider throws first chance MissingMethodException trying to instantiate DefaultEnumerableValueFormatter
TypeCatalogueInstanceProvider throws first chance MissingMethodException trying to instantiate DefaultEnumerableValueFormatter (#1790)Apply Object member rules even when the methods are overridden
Object member rules even when the methods are overridden (#1777)DoesNothing configuration for methods that return Task (#1784)DoesNothing only applies to void- or Task-returning members (#1782, #1784)GetAssemblyFileNamesToScanForExtensions method in the documentation (#1786)Add creation option that would allow calling object class methods on a strict Fake
IBootstrapper.GetAssemblyFileNamesToScanForExtensions returns null (#1689)ArgumentConstraintManagerExtensions.StartsWith and .EndsWith overloads that take a StringComparison (#1771)Source Stepping doesn't work because PDBs can't be found (#1751, #1685)
GetFakeManager usage in documentation (#1757)Limit typeparams for Fake options and builder classes
scope parameter to manager in ArgumentConstraintManagerExtensions methods (#1687)Repeated API (#1296)Repeated class" (#1296)IArgumentValueFormatter.GetArgumentValueAsString throws an exception or returns null (#1690)ArgumentConstraintManagerExtensions.Contains overload that takes a StringComparison (#1681)Contains string argument constraint, once again using StringComparison.Ordinal (accidentally switched to StringComparison.CurrentCulture in release5.4.0) (#1748)prepare_release tool should handle support branches (#1698)Fake.TryGetFakeManager and Fake.IsFake methods
Fake.TryGetFakeManager and Fake.IsFake methods (#1709)ReturnValue not set on completed call returned from Fake.GetCalls
Fake.GetCalls (#1696)Now targets netstandard2.1, as well as all the old favorites
Now targets netstandard2.1, as well as all the old favorites (#1658)
Enhanced support for ValueTask and ValueTask<TResult>, comparable to that for Task and Task<TResult> (#1658):
ValueTask Dummy is an actual completed ValueTaskValueTask<TResult> Dummy is an actual ValueTask<TResult> that is already completed and whose Result is a Dummy of type TResult, or a default TResult if no Dummy can be made for TResultValueTask (or ValueTask<T>) will return a cancelled task objectValueTask or ValueTask<T>:
Returns and ReturnsLazily let you specify a value rather than a task, which configures a method to return a completed task whose result is the specified valueThrowsAsync lets you configure a method to return a failed task whose Exception property is set to the given exceptionIf your test project targets a framework compatible with .NET Standard 2.1 or higher, these last two features are available in the FakeItEasy package itself. Otherwise, you can access them by referencing the new FakeItEasy.Extensions.ValueType NuGet package.
Analyzers now target .NET Standard 2.0 (#1667)
Make Dummy ValueTuples' members Dummies, to match Tuple
ValueTuples' members Dummies, to match Tuple (#1637)A<T>._, A<T>.Ignored, or A<T>.That (#1644)TargetInvocationException, not UserCallbackException (#1646)UserCallbackException (#1640)is null or is object (#1624)AnyCallRule (#1626)DummyCreationSpecs and don't use A.Dummy directly (#1659)Add overloads of Invokes, ReturnsLazily, etc for methods with 5–8 parameters (#1606) Previously overloads handled up to 4 parameters.
Stack overflow exception when creating second Fake of type that takes a parameter of its own type
WrapsAValidObjectOptionsBuilder static constructor (#1600)Calls are recorded after applying the best rule, not when received
Have ReturnsNextFromSequence guard against null values
Raising internal events silently fails
Greatly reduced time to create, configure, call, and assert on Fakes (#1466, #1469, #1470, #1489, #1493, #1507)
IFakeObjectCallRule to IInterceptionListener.OnAfterCallIntercepted (#1494, #1521)Delegate types (#1465)IRepeatConfiguration type used in fluent API to IBehaviorLifetimeConfiguration (#1294)InitializeFixture) (#992)IInterceptedFakeObjectCall.AsReadOnly (#1505)Raise.With<TEventHandler> (#1152)
Use Raise.FreeForm.With (or Raise.FreeForm(Of TEventHandler).With for VB) instead.Repeated (#1295)
Use one of the following formats instead:A.CallTo(() => foo.Bar()).MustHaveHappened();
A.CallTo(() => foo.Bar()).MustNotHaveHappened();
A.CallTo(() => foo.Bar()).MustHaveHappenedOnceExactly();
A.CallTo(() => foo.Bar()).MustHaveHappenedOnceOrMore();
A.CallTo(() => foo.Bar()).MustHaveHappenedOnceOrLess();
A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceExactly();
A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceOrMore();
A.CallTo(() => foo.Bar()).MustHaveHappenedTwiceOrLess();
A.CallTo(() => foo.Bar()).MustHaveHappened(4, Times.Exactly);
A.CallTo(() => foo.Bar()).MustHaveHappened(6, Times.OrMore);
A.CallTo(() => foo.Bar()).MustHaveHappened(7, Times.OrLess);
A.CallTo(() => foo.Bar()).MustHaveHappenedANumberOfTimesMatching(n => n % 2 == 0);
prepare_release command (#1538, #1539, #1540)Invokes is used (#1552, #1553)Stop wrapping exceptions thrown by Invokes callbacks
Invokes callbacks (#1543)Call assertions sometimes fail for concurrent calls
Small optimization in the creation of string and value-type Dummies
dotnet build (#1441)dotnet xunit in favor of dotnet test (#1444)NonGenericCreationSpecs.CacheSuccessfulConstructor (#1443)Source stepping is not available for net45 library
Dummy failure exception should include reasons for failure
Faked delegates with in parameters don't honor the read-only semantics
in parameters are silently ignored #1391 (#1391)Avoid asking proxy generators to create Fakes that they can't (#1355, #1365)
in parameters (#1338)AnyCallConfiguration.WhenArgumentsMatch (#1370)Resolve Fakes' constructor arguments lazily
string Dummy under dotnet core 2.1 RC1.ref returns or in parameters (#1337)GenerateProxy overload that doesn't take attribute list (#1352)RepeatedAssertionAnalyzer throws NullReferenceException when encountering an expression with no type (such as nameof(symbol))
RepeatedAssertionAnalyzer throws NullReferenceException when encountering an expression with no type (such as nameof(symbol)) (#1328)Code fix provider to convert assertions using the legacy Repeated class to the new API (#1297, #1309) Includes one-click "fix all issues in solution".
Repeated class to the new API (#1297, #1309)
Includes one-click "fix all issues in solution".ExpressionCallMatcher (#684)Module class (#1315)CallConstraintDescriber static (#1314)New API for asserting completed calls (#1292, #1300) Replaces calls that used the Repeated class, which will be deprecated in version 5.0.0 and remove…
Repeated class, which will be deprecated in version 5.0.0 and removed in 6.0.0.
Here's the new API:A.CallTo(() => fake.Method()).MustHaveHappened() // as today
A.CallTo(() => fake.Method()).MustNotHaveHappened() // as today
A.CallTo(() => fake.Method()).MustHaveHappenedOnceExactly()
A.CallTo(() => fake.Method()).MustHaveHappenedOnceOrMore()
A.CallTo(() => fake.Method()).MustHaveHappenedOnceOrLess()
A.CallTo(() => fake.Method()).MustHaveHappenedTwiceExactly()
A.CallTo(() => fake.Method()).MustHaveHappenedTwiceOrMore()
A.CallTo(() => fake.Method()).MustHaveHappenedTwiceOrLess()
A.CallTo(() => fake.Method()).MustHaveHappened(3, Times.Exactly)
A.CallTo(() => fake.Method()).MustHaveHappened(3, Times.OrMore)
A.CallTo(() => fake.Method()).MustHaveHappened(3, Times.OrLess)
A.CallTo(() => fake.Method()).MustHaveHappenedANumberOfTimesMatching(n => n %2 == 0)
Raise.FreeForm.With is not available from VB.Net and our only alternative is deprecated (#1287)
Created Raise.FreeForm<TEventHandler>.With that can be used from Visual BasicUpdating to 4.2.0 removes the analyzer from the project file
WithVoidReturnType method (#1272)mkdocs.yml back to root to fix documentation rendering (#1267)Detect wrong argument constraint type at runtime
prepare_release.csx (#1242)False positive nested constraint exception when using an argument constraint of the wrong type
prepare_release now creates release issue with proper labels (#1226)Enhance formatting of received enumerable arguments in "unmatched call" output
IsSameSequenceAs (#1194)FakeItEasy0005) and code fix for argument constraint type mismatch (#1163)FakeItEasy0002 is now an error, not a warning (#1203)That (or Ignored, or _) is nested deeper in A.CallTo, instead of misbehaving (#1177)Nothing published for this version
Don't expose Not after Not in argument constraint
Not after Not in argument constraint (#1063)FakeObjectCallExtensions.Write and FakeObjectCallExtensions.WriteToConsole (#1043)RecordedBy fake option) (#798)ITaggable, which was an internal implementation detail (#1012)Fake.InitializeFixture (#1102)Raise.With<TEventHandler> (#1153)
Raise.Freeform.With insteadAssignsOutAndRefParameters on a non-void member without first specifying Returns (#1134)Raise.Freeform.With) (#987)FakeItEasy0004 diagnostic for argument constraint with non-nullable type instead of nullable type (#1060)ICompletedFakeObjectCall.ArgumentsAfterCall (#1140)FakeOptionsExtensions methods' optionsBuilders parameters to options (#1122)Don't expose Not after Not in argument constraint
FakeObjectCallExtensions.Write and FakeObjectCallExtensions.WriteToConsole (#1043)RecordedBy fake option) (#798)ITaggable, which was an internal implementation detail (#1012)Fake.InitializeFixture (#1102)Raise.With<TEventHandler> (#1153)
Raise.Freeform.With insteadAssignsOutAndRefParameters on a non-void member without first specifying Returns (#1134)Raise.Freeform.With) (#987)FakeItEasy0004 diagnostic for argument constraint with non-nullable type instead of nullable type (#1060)ICompletedFakeObjectCall.ArgumentsAfterCall (#1140)FakeOptionsExtensions method's optionsBuilders paremeters to options (#1122)Setting ref argument values masks incoming argument values used to verify calls
Could not load file or assembly Castle.Core, Version=4.1.0.0
New assembly targeting .NET 4.5
EventArgs in event raisers when targeting .NET 4.5 (#1008)ReflectionTypeLoadException when loading extension points (#1092)RuleBuilder.MustHaveHappened builds call description lazily (#796)TypeCatalogueTests (#1093)Wrong diagnostic id for FakeItEasy0003 (argument constraint outside call specification)
FakeItEasy003 false positive when returning argument constraint from helper method
[Analyzer] diagnostic for use of argument constraints outside of a call specification
That.IsNotNull argument constraint (and That.IsNull for nullable types) (#1062, #1071)CreationSpecsBase test hierarchy's threadsafety (#1069)When user attempts to configure a non-Fake, indicate _which_ object was used
Fake.ClearRecordedCalls(fake) clears recorded calls on a fake (#978)FakeObjectCallExtensions.Write and FakeObjectCallExtensions.WriteToConsole (#1030)Fake<T> no longer implements (internal) interface IStartConfiguration<T> (#959)No longer attempting to instantiate open generic types when searching for bootstrappers and extension points
EventHandlers' event arguments no longer need to extend EventArgs in event raisers for the .NET Standard library (still required for the .NET 4.0 library) (#361)ToString() produces the same type format as Object.ToString() (#994)NullReferenceException thrown when passing null to method that accepts a nullable argument but matching against non-nullable variant (#660)IFakeObjectContainer class (#757)ToString() of an argument throws an exception (#457)Deprecated RecordedBy method as well as types that support self-initializing Fakes. To be removed in 4.0.0
Support for .NET Standard 1.6, including .NET Core 1.0 (#531)
Some functionality available in the .NET 4.0 assembly is not available in the .NET Standard assembly. In particular, note that:
SelfInitializedFakes (e.g. fakeService = A.Fake<ILibraryService>(options => options.Wrapping(realService).RecordedBy(recorder)) are not supportedNew syntax (Then) to configure successive calls to the same member. (#803):
A.CallTo(() => foo.Bar()).Returns(0).Twice()
.Then.Throws<InvalidOperationException>().Once()
.Then.Returns(1);
Automatic cancellation support #904
Methods that accept a CancellationToken will now automatically throw an OperationCanceledException (or return a canceled task, for async methods) when they receive a canceled token.
Add a ThrowsAsync method to return a failed task rather than directly throw an exception (#932)
Add CallsToSet to unnatural fakes (Fake<T>) (#838)
Using Castle.Core 4.0.0, with .NET Core support (#974)
[Analyzer] Add an analyzer that supports VB.NET (#952)
WithAdditionalAttributes Fake configuration option is replaced by WithAttributes (#436):
var foo = A.Fake<IFoo>(x => x.WithAttributes(() => new FooAttribute()));
IAfterCallSpecifiedConfiguration is renamed to IAfterCallConfiguredConfiguration (#910)
Default read/write property behavior no longer overrides explicit configuration of getter and setter (#962)
Hide object members on several fluent API interfaces (#944)
Deprecated RecordedBy method as well as types that support self-initializing Fakes. To be removed in 4.0.0 (#820)
Invokes or DoesNothing (#830)IStartConfiguration<T>. It had been always been intended for internal use only. (#864)Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.