WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
Apache License 2.0
1.39k
stars
207
forks
source link
[FluentAssertions] Should().HaveReceivedACall().WithHeader() only checks the first header with the matching key. #958
I have a scenario where I send 2 different requests to wiremock.
One has the header Authorization: Bearer invalidToken
The other has the header Authorization: Bearer validToken
I'm trying to assert that I received a request with each of these headers:
Describe the bug
I have a scenario where I send 2 different requests to wiremock. One has the header
Authorization: Bearer invalidToken
The other has the headerAuthorization: Bearer validToken
I'm trying to assert that I received a request with each of these headers:However, the second assertion fails, because
WithHeader()
only checks the firstAuthorization
header of all received requests.Expected behavior:
Both these assertions should succeed.
WithHeader
should check the headers of all requests, not just the first.Test to reproduce
Other related info
Provide additional information if any.