System.Net.Http.AutoRedirectTests.Can_set_redirect_limit C# (CSharp) Method

Can_set_redirect_limit() private method

private Can_set_redirect_limit ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public async Task Can_set_redirect_limit()
        {
            _handler.AutoRedirectLimit = 10;
            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 = 10");
            }
        }