Пример #1
0
        public void CanCreateInstance()
        {
            using (var handler = new AcmeHttpHandler(server)) { }

            using (var http = new HttpClient())
            {
                using (var handler = new AcmeHttpHandler(server, http)) { }
            }

            using (var handler = new AcmeHttpHandler(server, (HttpClient)null)) { }

#pragma warning disable 0618
            using (var handler = new AcmeHttpHandler(server, (HttpMessageHandler)null)) { }
            using (var handler = new AcmeHttpHandler(server, CreateHttpMock().Object)) { }
#pragma warning restore 0618
        }
Пример #2
0
        public void CanCreateInstance()
        {
            using (var handler = new AcmeHttpHandler(WellKnownServers.LetsEncryptStaging)) { }

            using (var http = new HttpClient())
            {
                using (var handler = new AcmeHttpHandler(WellKnownServers.LetsEncryptStaging, http)) { }
            }

            using (var handler = new AcmeHttpHandler(WellKnownServers.LetsEncryptStaging, (HttpClient)null)) { }

#pragma warning disable 0618
            using (var handler = new AcmeHttpHandler(WellKnownServers.LetsEncryptStaging, (HttpMessageHandler)null)) { }
            using (var handler = new AcmeHttpHandler(WellKnownServers.LetsEncryptStaging, CreateHttpMock().Object)) { }
#pragma warning restore 0618
        }