mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
FluentAssertions - assert the server has not received a call #418
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MeuLee on GitHub (May 10, 2022).
Originally assigned to: @StefH on GitHub.
Is your feature request related to a problem? Please describe.
Using
HaveReceived(0).Calls()throws an exception if no calls have been made."Expected StubServer to have been called at address matching the absolute url "https://localhost:62040/path/to/the/resource", but no calls were made."
Describe the solution you'd like
HaveReceived(0).Calls()should validate that no calls have been made to the stub server, optionally taking into account the specifications such as.AtAbsoluteUrl()I suppose the method was not intended to be used this way, but I think it would be neat to leverage WireMock.FluentAssertions for this kind of tests.
A use case I have in mind is for caching server responses.
Describe alternatives you've considered
I am currently using the following - just FluentAssertions, not the WireMock version.
@StefH commented on GitHub (May 11, 2022):
@MeuLee
Good point. I'll take a look.
@StefH commented on GitHub (May 13, 2022):
Will be fixed in new version.