public async Task When_caught_in_a_redirect_loop_should_throw()
{
using (var client = new HttpClient(_handler)
{
BaseAddress = new Uri("http://localhost")
})
{
Func<Task> act = () => client.GetAsync("/redirect-loop");
var exception = await act.ShouldThrowAsync<InvalidOperationException>();
exception.Message.ShouldContain("Limit = 20");
}
}