public void TestXboxDirectoryInfoCopyXboxToXbox() { ShimXboxDirectoryInfo.AllInstances.ExistsGet = info => true; XboxDirectoryInfo directoryInfo = new XboxDirectoryInfo(new ShimXboxFileSystemInfoDefinition(), this.XboxConsole); directoryInfo.Copy(@"xd:\directory"); }
public void TestXboxDirectoryInfoCopyDirectoryDoesNotExist() { XboxDirectoryInfo directoryInfo = new XboxDirectoryInfo(@"xd:\test", XboxOperatingSystem.System, this.XboxConsole); ShimXboxDirectoryInfo shimDirectoryInfo = new ShimXboxDirectoryInfo(directoryInfo) { ExistsGet = () => false }; directoryInfo.Copy(@"c:\test"); }
public void TestXboxDirectoryInfoCopyDefaultIsRecursive() { bool success = false; ShimXboxFileSystemInfo.AllInstances.ExistsGet = info => true; ShimXboxDirectoryInfo.AllInstances.CopyStringBoolean = (dirInfo, localPath, isRecursive) => { success = true; Assert.IsTrue(isRecursive); }; XboxDirectoryInfo directoryInfo = new XboxDirectoryInfo(new ShimXboxFileSystemInfoDefinition(), this.XboxConsole); directoryInfo.Copy(@"C:\test"); Assert.IsTrue(success); }
public void TestXboxDirectoryInfoCopyCreatesDirectoryIfItDoesNotExist() { bool success = false; ShimXboxFileSystemInfoDefinition xboxFileShim = new ShimXboxFileSystemInfoDefinition() { PathGet = () => new XboxPath(@"xd:\directory", XboxOperatingSystem.System) }; ShimDirectory.ExistsString = s => false; ShimDirectory.CreateDirectoryString = path => { success = true; return(null); }; ShimXboxDirectoryInfo.AllInstances.ExistsGet = info => true; XboxDirectoryInfo directoryInfo = new XboxDirectoryInfo(xboxFileShim, this.XboxConsole); directoryInfo.Copy(@"c:\directory"); Assert.IsTrue(success); }
public void TestXboxDirectoryInfoCopyNullDirectory() { XboxDirectoryInfo directoryInfo = new XboxDirectoryInfo(new ShimXboxFileSystemInfoDefinition(), this.XboxConsole); directoryInfo.Copy(null); }