public void ValidHTTPSURL()
        {
            string          URL         = "https://www.google.com";
            HttpRequestInfo requestInfo = new HttpRequestInfo(URL, RequestType.Get, null);

            Assert.IsNotNull(requestInfo.GetURI());
            Assert.AreEqual(new Uri(URL), requestInfo.GetURI());
        }
        public void ValidHTTPIPAddress()
        {
            string          URL         = "http://127.0.0.1";
            HttpRequestInfo requestInfo = new HttpRequestInfo(URL, RequestType.Get, null);

            Assert.IsNotNull(requestInfo.GetURI());
            Assert.AreEqual(new Uri(URL), requestInfo.GetURI());
        }
        public void InvalidURLWithOutTopLevelDomainButStillValid()
        {
            String          URL         = "http://ADomainHere";
            HttpRequestInfo requestInfo = new HttpRequestInfo(URL, RequestType.Get, null);

            Assert.IsNotNull(requestInfo.GetURI());
            Assert.AreEqual(new Uri(URL), requestInfo.GetURI());
        }
        public void GetRequestWithParameters()
        {
            Uri testUri = new Uri("http://google.com?username=AUser&password=APass");
            HttpContentToSend content     = new HttpContentToSend("username=AUser&password=APass", ContentType.GetForm);
            HttpRequestInfo   requestInfo = new HttpRequestInfo("http://google.com", RequestType.Get, content);

            Assert.IsNotNull(requestInfo.GetURI());
            Assert.AreEqual(testUri, requestInfo.GetURI());
        }
        public void InvalidIPAddressNoProtocol()
        {
            string          URL         = "127.0.0.1";
            HttpRequestInfo requestInfo = new HttpRequestInfo(URL, RequestType.Get, null);

            Assert.IsNull(requestInfo.GetURI());
        }
        public void InvalidURLWithTopLevelDomain()
        {
            string          URL         = "ADomainHere.com";
            HttpRequestInfo requestInfo = new HttpRequestInfo(URL, RequestType.Get, null);

            Assert.IsNull(requestInfo.GetURI());
        }
        public void InvalidEmptyURL()
        {
            HttpRequestInfo requestInfo = new HttpRequestInfo(string.Empty, RequestType.Get, null);

            Assert.IsNull(requestInfo.GetURI());
        }