public void TestGetProxyStringWithUsernamePasswordWithReservedCharacters() { IWebProxy proxy = new WebProxy("127.0.0.1") { Credentials = new NetworkCredential("user:name", "pass:word") }; Assert.AreEqual("http://user%3Aname:pass%[email protected]:80", proxy.GetProxyString()); }
public void TestGetProxyStringWithHttpAddress() { IWebProxy proxy = new WebProxy("127.0.0.1"); Assert.AreEqual("http://127.0.0.1:80", proxy.GetProxyString()); }
public void TestGetProxyStringWithEmptyProxy() { IWebProxy proxy = new WebProxy(); Assert.AreEqual(string.Empty, proxy.GetProxyString()); }
public void TestGetProxyStringWithSocks5AddressWithProtocol() { IWebProxy proxy = new WebProxy("socks5://127.0.0.1"); Assert.AreEqual("socks5://127.0.0.1:1080", proxy.GetProxyString()); }