We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When asserting headers via the FluentAssertions extensions, headers are not filtered correctly (headers from all captured requests are checked).
I expect the assertions to only consider the requests that match the previous filters (see example below).
[Test] public async Task SendGetWithHeader () { using var server = WireMockServer.Start(); using var httpClient = new HttpClient(); // ACT await httpClient.GetAsync(server.Url!); var request = new HttpRequestMessage(HttpMethod.Post, server.Url!); request.Headers.Add("TestHeader", "Value"); await httpClient.SendAsync(request); // ASSERT server.Should().HaveReceivedACall().UsingGet().And.WithHeader("TestHeader", "Value"); }
This test succeeds although it should fail, since only the POST request has the header, the GET request does not.
I'm using WireMock.Net & WireMock.Net.FluentAssertions 1.5.48.
The text was updated successfully, but these errors were encountered:
@chrischu I can confirm this bug and it's fixed in preview version 1.5.49-ci-18411
https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
Sorry, something went wrong.
Thanks for the quick fix!
StefH
No branches or pull requests
Describe the bug
When asserting headers via the FluentAssertions extensions, headers are not filtered correctly (headers from all captured requests are checked).
Expected behavior:
I expect the assertions to only consider the requests that match the previous filters (see example below).
Test to reproduce
This test succeeds although it should fail, since only the POST request has the header, the GET request does not.
Other related info
I'm using WireMock.Net & WireMock.Net.FluentAssertions 1.5.48.
The text was updated successfully, but these errors were encountered: