Add WebClient.Proxy unit test
authorSebastien Pouliot <sebastien@xamarin.com>
Sun, 5 Feb 2012 16:55:36 +0000 (11:55 -0500)
committerSebastien Pouliot <sebastien@xamarin.com>
Sun, 5 Feb 2012 16:55:36 +0000 (11:55 -0500)
mcs/class/System/Test/System.Net/WebClientTest.cs

index 84954f9be4c0b094513346263f1c7eb1debc5680..9917fa9a441b49b185509681aedbd0445f2c5898 100644 (file)
@@ -2138,5 +2138,15 @@ namespace MonoTests.System.Net
 
                        return Encoding.UTF8.GetBytes (sw.ToString ());
                }
+
+               [Test]
+               public void DefaultProxy ()
+               {
+                       WebClient wc = new WebClient ();
+                       // this is never null on .net
+                       Assert.IsNotNull (wc.Proxy);
+                       // and return the same instance as WebRequest.DefaultWebProxy
+                       Assert.AreSame (wc.Proxy, WebRequest.DefaultWebProxy);
+               }
        }
 }