Esempio n. 1
0
        public void Should_Set_Client_Timeout()
        {
            var factory = new PerUrlHttpClientFactory(TimeSpan.FromMinutes(15));
            var client  = factory.GetHttpClient("http://www.baidu.com");

            Assert.Equal(client.Timeout, TimeSpan.FromMinutes(15));
        }
Esempio n. 2
0
        public void Should_Set_Client_Timeout_To_Default()
        {
            var factory = new PerUrlHttpClientFactory();
            var client  = factory.GetHttpClient("http://www.baidu.com");

            Assert.Equal(client.Timeout, TimeSpan.FromSeconds(100));
        }