public void Copy() { IDirectory Temp = new Utilities.IO.FileSystem.Default.ResourceDirectory("resource://UnitTests/"); IDirectory Temp2 = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test/"); Temp2.Create(); while (!Temp2.Exists) { } Temp = Temp.CopyTo(Temp2); Assert.True(Temp.Exists); Assert.True(Temp2.Exists); int Count = 0; foreach (var Files in Temp2.EnumerateFiles()) { Assert.NotEqual(0, Files.Length); ++Count; } Assert.Equal(1, Count); Temp2.Delete(); while (Temp2.Exists) { } }
public void Copy() { var Temp = new Utilities.IO.FileSystem.Default.WebDirectory("http://www.google.com"); var Temp2 = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test/"); Temp2.Create(); while (!Temp2.Exists) { } Temp.CopyTo(Temp2); Assert.True(Temp.Exists); Assert.True(Temp2.Exists); int Count = 0; foreach (var Files in Temp2.EnumerateFiles()) { Assert.NotEqual(0, Files.Length); ++Count; } Assert.Equal(1, Count); Temp2.Delete(); }