We can already set up preconditions on the Route with the syntax
sut.Request(HttpMethod.Get)
.IfRoute("/testget")
...
But we don't have any way to have a precondition for a specific query string argument.
(We can do .IfRoute("/testget?arg1=foo&arg2=bar"), but it's not really intuitive.)
We should introduce a new condition method called IfQueryArg, which would check the value of a specific query string argument.
Example usage:
sut.Request(HttpMethod.Get)
.IfRoute("/testget")
.IfQueryArg("arg1", "foo")
.IfQueryArg("arg2", "bar")
...
We can already set up preconditions on the Route with the syntax
But we don't have any way to have a precondition for a specific query string argument.
(We can do
.IfRoute("/testget?arg1=foo&arg2=bar"), but it's not really intuitive.)We should introduce a new condition method called
IfQueryArg, which would check the value of a specific query string argument.Example usage: