Open robert-bialy opened 1 year ago
Thanks for the suggestion.
This is possible today, albeit not with a Moq-like syntax.
Using the latest available release, you can do something like this:
In the next release, this can be simplified a bit using the new ForAll()
method:
I'll leave this open for us to consider if there's a relatively low-effort way we could achieve an API similar to what you suggested with some additional extension methods or similar in a future release.
I would like to have an option to setup a sequence of responses for certain request. It would certainly help with testing retry policies.
Describe the solution you'd like
Moq allows for user to setup a sequence of responses like:
It would be great if we would be able to do the same in this library: