mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-21 00:28:59 +01:00
* r * fix * sw * x * s * . * . * . * CreateTypeFromJObject * . * . * f * c * . * . * . * . * . * . * ok * , * . * . * . * . * n * pact * fix * schema * null * fluent * r * -p * . * . * refs * .
51 lines
1.9 KiB
C#
51 lines
1.9 KiB
C#
using FluentAssertions.Primitives;
|
|
using WireMock.Server;
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
namespace WireMock.FluentAssertions
|
|
{
|
|
/// <summary>
|
|
/// Contains a number of methods to assert that the <see cref="IWireMockServer"/> is in the expected state.
|
|
/// </summary>
|
|
public class WireMockReceivedAssertions : ReferenceTypeAssertions<IWireMockServer, WireMockReceivedAssertions>
|
|
{
|
|
/// <summary>
|
|
/// Create a WireMockReceivedAssertions.
|
|
/// </summary>
|
|
/// <param name="server">The <see cref="IWireMockServer"/>.</param>
|
|
public WireMockReceivedAssertions(IWireMockServer server) : base(server)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Asserts if <see cref="IWireMockServer"/> has received no calls.
|
|
/// </summary>
|
|
/// <returns><see cref="WireMockAssertions"/></returns>
|
|
public WireMockAssertions HaveReceivedNoCalls()
|
|
{
|
|
return new WireMockAssertions(Subject, 0);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Asserts if <see cref="IWireMockServer"/> has received a call.
|
|
/// </summary>
|
|
/// <returns><see cref="WireMockAssertions"/></returns>
|
|
public WireMockAssertions HaveReceivedACall()
|
|
{
|
|
return new WireMockAssertions(Subject, null);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Asserts if <see cref="IWireMockServer"/> has received n-calls.
|
|
/// </summary>
|
|
/// <param name="callsCount"></param>
|
|
/// <returns><see cref="WireMockANumberOfCallsAssertions"/></returns>
|
|
public WireMockANumberOfCallsAssertions HaveReceived(int callsCount)
|
|
{
|
|
return new WireMockANumberOfCallsAssertions(Subject, callsCount);
|
|
}
|
|
|
|
/// <inheritdoc cref="ReferenceTypeAssertions{IWireMockServer, WireMockReceivedAssertions}.Identifier"/>
|
|
protected override string Identifier => "wiremockserver";
|
|
}
|
|
} |