WireMock.Net: ParamMatcher failed when using parameter with comma
Describe the bug
I’m working on a system that consumes a 3rd party API which accepts as querystring a SQL statement. For example, to query some data from any table just build the URI like this:
http://host/api/queryservice?query=SELECT id FROM table WHERE id = 1
While trying to mock this API, I realized that whenever I tried to mock a statement using comma, the ParamMatcher fails. For example,SELECT id, value FROM table WHERE id = 1
. And I received a 404 (NotFound) error code.
Expected behavior:
I expected the ParamMatcher has succeded, and returned 200 (OK).
Test to reproduce
1 - Create an API which receives as querystring a SQL statement 2 - Mock that API using “WithParam” function 3 - Test creating a statement which has a ‘comma’ within, “SELECT id, value FROM table WHERE id = 1”
Other related info
Provide additional information if any.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16
No. Nothing is wrong on your end
I just realized that I need to release a new version which includes this.
I’ll do that now.