public void ShouldVerifyBetweenSuccess() { SendHello(2); Assert.NotNull(MockServerClient.Verify(Request() .WithMethod(HttpMethod.Get) .WithPath("/hello"), VerificationTimes.Between(1, 3))); }
public void ShouldVerifyBetweenFailed() { var ex = Assert.Throws <AssertionException>(() => { MockServerClient.Verify(Request() .WithMethod(HttpMethod.Get) .WithPath("/hello"), VerificationTimes.Between(1, 2)); }); Assert.StartsWith("Request not found between 1 and 2", ex.Message); }
/// <inheritdoc /> public void Between(int min, int max) { _verificationTimes = VerificationTimes.Between(min, max); }