using Stef.Validation;
using WireMock.Server;
// ReSharper disable once CheckNamespace
namespace WireMock.FluentAssertions;
///
/// Provides assertion methods to verify the number of calls made to a WireMock server.
/// This class is used in the context of FluentAssertions.
///
public class WireMockANumberOfCallsAssertions
{
private readonly IWireMockServer _server;
private readonly int _callsCount;
///
/// Initializes a new instance of the class.
///
/// The WireMock server to assert against.
/// The expected number of calls to assert.
public WireMockANumberOfCallsAssertions(IWireMockServer server, int callsCount)
{
_server = Guard.NotNull(server);
_callsCount = callsCount;
}
///
/// Returns an instance of which can be used to assert the expected number of calls.
///
/// A instance for asserting the number of calls to the server.
public WireMockAssertions Calls()
{
return new WireMockAssertions(_server, _callsCount);
}
}