System.Net.Http.WinHttpHandlerUnitTests.WinHttpHandlerTest.SendAsync_AutomaticProxySupportAndUseDefaultWebProxy_ExpectedWinHttpSessionProxySettings C# (CSharp) Method

SendAsync_AutomaticProxySupportAndUseDefaultWebProxy_ExpectedWinHttpSessionProxySettings() private method

        public void SendAsync_AutomaticProxySupportAndUseDefaultWebProxy_ExpectedWinHttpSessionProxySettings()
        {
            TestControl.WinHttpAutomaticProxySupport = true;
            var handler = new WinHttpHandler();

            SendRequestHelper.Send(
                handler,
                delegate
                {
                    handler.WindowsProxyUsePolicy = WindowsProxyUsePolicy.UseCustomProxy;
                    handler.Proxy = new FakeDefaultWebProxy();
                });

            Assert.Equal(Interop.WinHttp.WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY, APICallHistory.SessionProxySettings.AccessType);
        }
WinHttpHandlerTest