public void TestXboxDirectoryCopyXboxPCCallsXboxDirectoryInfoCopyCorrectly() { bool success = false; IProgress <XboxFileTransferMetric> expectedProgress = null; ShimXboxPath.HasXboxOriginString = path => true; ShimXboxDirectoryInfo.AllInstances.CopyStringIProgressOfXboxFileTransferMetric = (xboxDirectoryInfo, path, metrics) => { success = true; Assert.AreEqual(this.xboxDirectoryPath.FullName, xboxDirectoryInfo.FullName, "Copy didn't pass on the correct directory."); Assert.AreEqual(this.pcDirectory, path, "Copy didn't pass on the correct xbox directory."); Assert.AreSame(expectedProgress, metrics, "Copy didn't pass on the same progress object."); }; XboxDirectory.Copy(this.xboxDirectoryPath, this.pcDirectory, this.XboxConsole); Assert.IsTrue(success, "XboxDirectoryInfo.Copy wasn't called."); XboxDirectory.Copy(this.xboxDirectoryPath, this.pcDirectory, this.XboxConsole, null); expectedProgress = new Progress <XboxFileTransferMetric>(); XboxDirectory.Copy(this.xboxDirectoryPath, this.pcDirectory, this.XboxConsole, expectedProgress); }
public void TestXboxDirectoryCopyPCXboxCallsDirectoryInfoCopyToCorrectly() { bool success = false; IProgress <XboxFileTransferMetric> expectedProgress = null; ShimXboxPath.HasXboxOriginString = path => true; ShimDirectoryInfoExtensions.CopyToDirectoryInfoXboxPathXboxConsoleIProgressOfXboxFileTransferMetric = (directoryInfo, xboxPath, console, metrics) => { success = true; Assert.AreEqual(this.pcDirectory, directoryInfo.FullName, "Copy didn't pass on the correct directory."); Assert.AreEqual(this.xboxDirectoryPath, xboxPath, "Copy didn't pass on the correct xbox directory."); Assert.AreSame(expectedProgress, metrics, "Copy didn't pass on the same progress object."); return(null); }; XboxDirectory.Copy(this.pcDirectory, this.xboxDirectoryPath, this.XboxConsole); Assert.IsTrue(success, "DirectoryInfo.CopyTo wasn't called."); XboxDirectory.Copy(this.pcDirectory, this.xboxDirectoryPath, this.XboxConsole, null); expectedProgress = new Progress <XboxFileTransferMetric>(); XboxDirectory.Copy(this.pcDirectory, this.xboxDirectoryPath, this.XboxConsole, expectedProgress); }
public void TestXboxDirectoryCopyPCXboxNotSupportedDestinationDirectory() { ShimXboxPath.HasXboxOriginString = path => false; XboxDirectory.Copy(this.pcDirectory, this.xboxDirectoryPath, this.XboxConsole); }
public void TestXboxDirectoryCopyPCXboxArgumentNullDestinationDirectory() { XboxDirectory.Copy(this.pcDirectory, null, this.XboxConsole); }
public void TestXboxDirectoryCopyXboxPCNotSupportedSourceDirectory() { ShimXboxPath.HasXboxOriginString = path => false; XboxDirectory.Copy(this.xboxDirectoryPath, this.pcDirectory, this.XboxConsole); }
public void TestXboxDirectoryCopyXboxPCArgumentNullSourceDirectory() { XboxDirectory.Copy(null, this.pcDirectory, this.XboxConsole); }