Adds Verify support for verifying NSubstitute types.
See Milestones for release notes.
https://nuget.org/packages/Verify.NSubstitute/
[ModuleInitializer]
public static void Init() =>
VerifyNSubstitute.Initialize();
Given an interface:
public interface ITarget
{
void Method(int a, int b);
}
It .ReceivedCalls()
can be verified:
[Fact]
public Task Test()
{
var target = Substitute.For<ITarget>();
target.Method(1, 2);
return Verify(target.ReceivedCalls());
}
Will result in:
[
{
Method: ITarget.Method(int a, int b),
Arguments: [
1,
2
]
}
]