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 CreateAndDelete() { var Temp = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test"); Temp.Create(); Assert.True(Temp.Exists); Temp.Delete(); Assert.False(Temp.Exists); }
public void Move() { IDirectory Temp = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test"); IDirectory Temp2 = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test2"); Temp.Create(); Temp2.Create(); Temp2 = Temp2.MoveTo(Temp); Assert.True(Temp.Exists); Assert.True(Temp2.Exists); Assert.Equal(Temp.FullName, Temp2.Parent.FullName); Temp.Delete(); Assert.False(Temp.Exists); }
public void Copy() { var Temp = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test"); var Temp2 = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test2"); Temp.Create(); Temp2.Create(); IDirectory Temp3 = Temp2.CopyTo(Temp); Assert.True(Temp.Exists); Assert.True(Temp2.Exists); Assert.True(Temp3.Exists); Assert.Equal(Temp, Temp3); Assert.NotEqual(Temp, Temp2); Assert.NotEqual(Temp2, Temp3); Temp.Delete(); Temp2.Delete(); Assert.False(Temp.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(); }
public void Copy() { var Temp = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test"); var Temp2 = new Utilities.IO.FileSystem.Default.LocalDirectory("./Test2"); Temp.Create(); Temp2.Create(); var Temp3 = Temp2.CopyTo(Temp); Assert.True(Temp.Exists); Assert.True(Temp2.Exists); Assert.True(Temp3.Exists); Assert.Equal(Temp, Temp3); Assert.NotEqual(Temp, Temp2); Assert.NotEqual(Temp2, Temp3); Temp.Delete(); Temp2.Delete(); Assert.False(Temp.Exists); }