Ejemplo n.º 1
0
        public void CopyTask_Perform()
        {
            CopyTask target = new CopyTask();

            target.Source      = @"D:\Videos\DARDASIM_2.iso";
            target.Destination = @"c:\temp\DARDASIM_2.iso";
            var res = target.Perform();

            Assert.AreEqual(ResultStatus.Completed, res.Status);
        }
Ejemplo n.º 2
0
        public void CopyTask_CheckCancel()
        {
            CopyTask target = new CopyTask();

            target.Source      = @"D:\Videos\DARDASIM_2.iso";
            target.Destination = @"c:\temp\DARDASIM_2.iso";
            Task.Factory.StartNew(() => {
                Thread.Sleep(2000);
                target.Cancel();
            });
            var res = target.Perform();

            Assert.AreEqual(ResultStatus.Failed, res.Status);
        }