Skip to content

Provide helper method to set up a condition for a query string argument #9

@markvincze

Description

@markvincze

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")
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions