コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: MikeAustin71/CopyFileXml
        private static void PerformCopyOperation(LogAndDisplayController logDisplay)
        {
            var copyFileOp = AcquireCopyFileOperation(logDisplay);

            if(copyFileOp==null)
            {
                return;
            }

            var doCopyOp = new DoCopyOperation(logDisplay);

            doCopyOp.Execute(copyFileOp);
        }