mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
ExactMatcher with array pattern not working? #167
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 @FSatmar on GitHub (Mar 19, 2019).
Originally assigned to: @StefH on GitHub.
Hi,
So I created this mapping:
And I'm making this request:
but as you can see it does not work as I'm not getting the expected response. What am I doing wrong?
@StefH commented on GitHub (Mar 19, 2019):
The best option is to look at the logging from WireMock, there you will see which matchers match correctly. Can you post the logging here?
@FSatmar commented on GitHub (Mar 19, 2019):
I'm not sure what you mean? I posted the request log from __admin/requests
@StefH commented on GitHub (Mar 19, 2019):
You can do a GET request to :
http://{{wm_hostname}}/__admin/requests
@StefH commented on GitHub (Mar 19, 2019):
Or look at the console log where WireMock is running
@FSatmar commented on GitHub (Mar 20, 2019):
This is where I took the request log from (second snippet)
@StefH commented on GitHub (Mar 20, 2019):
I understand.
When a request is 100% or partially matching, the
/admin/requestsshows additional information:In your case you don't see this.
I'll check why it does not match...
@FSatmar commented on GitHub (Mar 20, 2019):
Oh, that part is missing from my logged request...
@StefH commented on GitHub (Mar 20, 2019):
If you set partialmapping to true, you will also get this part...
@FSatmar commented on GitHub (Mar 20, 2019):
Just tried it, but with partial mapping on any request I make just returns the latest mapping regardless of path or parameters. However I would need to have different mappings with same path but different parameters.
@StefH commented on GitHub (Mar 20, 2019):
It's a bug. Thanks for finding.
@StefH commented on GitHub (Mar 20, 2019):
Can you try a new MyGet version?
1.0.9-ci-11110
see https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
@FSatmar commented on GitHub (Mar 21, 2019):
It's working better in this version but there is still one bug: if I have 2 mappings, one has parameters {1,2} and the second {1,2,3}, when I make a request for {1,2,3} I still get the response for {1,2}. Does that make sense?
@StefH commented on GitHub (Mar 21, 2019):
can you try
WireMock.Net.1.0.9-ci-11120.nupkg?@FSatmar commented on GitHub (Mar 22, 2019):
I'm still getting the latest mapping back. So first I create mapping for {1,2}, then I create mapping for {1,2,3} and when I request response for {1,2} I get the response from {1,2,3} mapping.
@StefH commented on GitHub (Mar 23, 2019):
Please try WireMock.Net.1.0.9-ci-11123.nupkg
@FSatmar commented on GitHub (Mar 25, 2019):
Yes, that's it, working like a charm now!
@StefH commented on GitHub (Mar 25, 2019):
@FSatmar --> New official NuGet is uploaded.
@FSatmar commented on GitHub (Mar 26, 2019):
Cheers!