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
Version 1.5.33 always returns StatusCode 500 ' Internal Server Error'.
Should return the StatusCode provided in the ResponseBuilder.
using System.Net; using System.Text; using WireMock.RequestBuilders; using WireMock.ResponseBuilders; using WireMock.Server; public class SomeApiClientTests { [Fact] public async Task Should_ReturnCreated_When_PostRequestedIsValid() { // Arrange var server = WireMockServer.Start(); server.Given(Request.Create().UsingPost().WithPath("/some/endpoint")) .RespondWith(Response.Create().WithStatusCode(HttpStatusCode.Created)); var httpClient = new HttpClient { BaseAddress = new Uri(server.Url!) }; var requestUri = new Uri(httpClient.BaseAddress!, "some/endpoint"); var content = new StringContent(string.Empty, Encoding.UTF8, "application/json"); // Act var actual = await httpClient.PostAsync(requestUri, content); // Assert actual.StatusCode.Should().Be(HttpStatusCode.Created); } }
Ran under .Net 7 with Microsoft Visual Studio Community 2022 (64-bit) -Version 17.6.5
The text was updated successfully, but these errors were encountered:
Hello @macalbert. Thanks for reporting.
I will release a new version soon.
#989
Sorry, something went wrong.
Thanks @StefH!! 😃
StefH
No branches or pull requests
Describe the bug
Version 1.5.33 always returns StatusCode 500 ' Internal Server Error'.
Expected behaviour:
Should return the StatusCode provided in the ResponseBuilder.
Test to reproduce
Other related info
Ran under .Net 7 with Microsoft Visual Studio Community 2022 (64-bit) -Version 17.6.5
The text was updated successfully, but these errors were encountered: