Adds Verify support for verifying FakeItEasy types.
See Milestones for release notes.
https://nuget.org/packages/Verify.FakeItEasy/
[ModuleInitializer]
public static void Init() =>
VerifyFakeItEasy.Initialize();
Given an interface:
public interface ITarget
{
void Method(int a, int b);
}
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);
}
Will result in:
[
{
Method: ITarget.Method(int a, int b),
Arguments: [
1,
2
]
}
]
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);
}