public void SimpleCallTest()
        {
            var auth = new NullAuthenticator();
            var webRequest = auth.CreateHttpWebRequest("GET", new Uri("https://www.google.com"));

            Assert.IsNotNull(webRequest);
        }
        public void SimpleCallTest()
        {
            var auth = new NullAuthenticator();
            var webRequest = new HttpRequestFactory().Create(new Uri("https://www.google.com"), "GET");
            auth.ApplyAuthenticationToRequest(webRequest);

            Assert.IsNotNull(webRequest);
            Assert.That(webRequest.RequestUri, Is.EqualTo(new Uri("https://www.google.com")));
            Assert.That(webRequest.Method, Is.EqualTo("GET"));
        }
示例#3
0
        public Request()
        {
            applicationName = Utilities.GetAssemblyTitle() ?? "Unknown_Application";
            Authenticator = new NullAuthenticator();

            MaximumRetries = 3;
            RetryWaitTimeIncreaseFactor = 2.0;
            RetryInitialWaitTime = 1000;
        }
示例#4
0
        public Request()
        {
            applicationName = Utilities.GetAssemblyTitle() ?? "Unknown_Application";
            Authenticator = new NullAuthenticator();
            WebRequestFactory = new HttpRequestFactory();
            Parameters = new ParameterCollection();

            MaximumRetries = 3;
            RetryWaitTimeIncreaseFactor = 2.0;
            RetryInitialWaitTime = 1000;
        }