I am using wiremock (to mock our Rest API) for selenium tests. I have a rest end point like http://localhost:8080/compare-date?from=2018-03-01&to=2018-03-10
For this, we are trying to create some intelligent mock using Java
, which will be invoked only when to
date is less than the from
date. Ex: http://localhost:8080/compare-date?from=2018-03-01&to=2018-02-10
But, i am unable to achieve this. Kindly suggest how this can be done. Thanks in advance.
Thanks, Dharani
At the moment your best bet would be to create a custom
RequestMatcher
implementation that can determine whether a date falls between the query parameters.