2 // WebClientTest.cs - NUnit Test Cases for System.Net.WebClient
4 // Copyright (C) 2007 Novell, Inc (http://www.novell.com)
11 using System.Collections;
12 using System.Runtime.Serialization;
14 namespace MonoTests.System.Net {
16 public class WebClientTest {
19 [Category ("InetAccess")]
20 public void DownloadTwice ()
22 WebClient wc = new WebClient();
23 string filename = Path.GetTempFileName();
25 // A new, but empty file has been created. This is a test case
27 wc.DownloadFile("http://google.com/", filename);
29 // Now, remove the file and attempt to download again.
30 File.Delete(filename);
31 wc.DownloadFile("http://google.com/", filename);
33 // We merely want this to reach this point, bug 81066.