Hi,
TLDR; I am not able to match a query parameter because it contains "=" sign within the value. is there a way to match that? Am I missing something basic?
My url looks something like this:
/my/relative/path?param1=some_thing¶m1=condition1 AND condition2 OR condition3
Here param1 accepts a sql like query (not completely but something of that sort). Here each condition can be of following form:
<some_field> <operand> <some_value>
for ex, projectId = 12
I am mocking this request like this:
MockServer
.Given('/my/relative/path')
.WithParam("param1", new RegexMatcher("*10001*"))
.RespondWith(Response .Create()
.WithStatusCode(200)
.WithHeader("content-type", "application/json;charset=UTF-8")
.WithBody("some body value"));
I have to mock based on projectIds from the conditions, for example: above mock is for projectId 10001. But this never matches. I have identified that if the query value doesn't contain equal to sign (ie. should not be "=", ">=", "<=", "!="), then it matches my request. But when it contains equal to sign, it returns me no matching mapping found.
Does any one know how do I resolve this?