-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
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
StatusCode not built correctly when loaded from mapping file. #400
Labels
Comments
Thanks a lot for finding this issue! |
PR was already created, merged to master. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Scenario:
Using WireMock.Net v1.1.0.0
All requests that match the attached mapping (Returns500Response.txt) get a response whose StatusCode is 200.
Expectation:
The response should have the StatusCode that is specified in the mapping file. (500)
Analysis:
The problem appears to be here: (WireMockServer.Admin.cs, line 811)
When stepping through the code,
responseModel.StatusCode
is 500. (Which is correct.) However, according to the debugger it has been deserialized as a long. Because of that, it skips over the switch statement entirely and responseBuilder.ResponseMessage.StatusCode ends up being set to 200.The text was updated successfully, but these errors were encountered: