Verify.FakeItEasy

April 9, 2026 ยท View on GitHub

Discussions Build status NuGet Status

Adds Verify support for verifying FakeItEasy types.

See Milestones for release notes.

Sponsors

Entity Framework Extensions

Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.

Entity Framework Extensions

Developed using JetBrains IDEs

JetBrains logo.

NuGet

Usage

[ModuleInitializer]
public static void Init() =>
    VerifyFakeItEasy.Initialize();

snippet source | anchor

Given an interface:

public interface ITarget
{
    void Method(int a, int b);
}

snippet source | anchor

Its .GetCalls() can be verified:

[Fact]
public Task ReceivedCalls()
{
    var target = A.Fake<ITarget>();
    target.Method(1, 2);
    var calls = Fake.GetCalls(target);
    return Verify(calls);
}

snippet source | anchor

Will result in:

[
  {
    Method: ITarget.Method(int a, int b),
    Arguments: [
      1,
      2
    ]
  }
]

snippet source | anchor

A instance of FakeManager can also be verified.

[Fact]
public Task FakeManager()
{
    var target = A.Fake<ITarget>();
    target.Method(1, 2);
    var fakeManager = Fake.GetFakeManager(target);
    return Verify(fakeManager);
}

snippet source | anchor