naps2/NAPS2.Sdk.Tests/TestExtensions.cs
Ben Olden-Cooligan 657a05c2d2 Replace Moq with NSubstitute
Moq can no longer be trusted from a security/privacy standpoint (see https://github.com/moq/moq/issues/1372). As I do prefer Moq I may revert this if there is a trustworthy fork.
2023-08-10 18:08:34 -07:00

12 lines
267 B
C#

using NSubstitute;
using Xunit;
namespace NAPS2.Sdk.Tests;
public static class TestExtensions
{
public static void ReceivedCallsCount<T>(this T substitute, int count) where T : class
{
Assert.Equal(count, substitute.ReceivedCalls().Count());
}
}