// Copyright © WireMock.Net 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; private readonly AssertionChain _chain; /// /// Initializes a new instance of the class. /// /// The WireMock server to assert against. /// The expected number of calls to assert. /// The assertion chain public WireMockANumberOfCallsAssertions(IWireMockServer server, int callsCount, AssertionChain chain) { _server = Guard.NotNull(server); _callsCount = callsCount; _chain = chain; } /// /// 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, _chain); } }