public void TestCopyFiles() { var ex = new DoCopyOperation(new LogAndDisplayController(new AppConfigurationModes{ExecutionMode = AppExecutionMode.ExecuteWithoutLog})); ex.Execute(_copyFileOp); var cmd1 = _copyFileOp.CopyFileCommands[0]; var dSrcInfo = new DirectoryInfo(cmd1.SourceDirectory); var dTargInfo = new DirectoryInfo(cmd1.TargetDirectory); var cnt1 = dSrcInfo.GetFileSystemInfos().Length; var cnt2 = dTargInfo.GetFileSystemInfos().Length; Assert.IsTrue(cnt1 == cnt2); }
private static void PerformCopyOperation(LogAndDisplayController logDisplay) { var copyFileOp = AcquireCopyFileOperation(logDisplay); if(copyFileOp==null) { return; } var doCopyOp = new DoCopyOperation(logDisplay); doCopyOp.Execute(copyFileOp); }