Open
Description
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:
consumerService.SetupSequence(c => c.Consume(It.IsAny<CancellationToken>()))
.Returns(payload)
.Throws<OperationCanceledException>()
.Returns(payload);
It would be great if we would be able to do the same in this library:
builder
.Requests()
.ForPost()
.ForHttps()
.ForHost(host)
.ForPath(endpoint)
.RespondsInSequence()
.WithStatus(HttpStatusCode.InternalServerError)
.Then()
.WithStatus(HttpStatusCode.InternalServerError)
.Then()
.WithStatus(HttpStatusCode.OK)
.RegisterWith(options);