Exemple #1
0
        public void Setup()
        {
            _sourceTempFolder         = new TemporaryFolder("MirrorMakerSource");
            _destTempFolder           = new TemporaryFolder("MirrorMakerDest");
            _sourceRoot               = _sourceTempFolder.Path;
            _parentOfDestingationPath = _destTempFolder.Combine("myWorkSafe-Sally");

            _maker = new MirrorMaker(_sourceRoot, _parentOfDestingationPath);
        }
Exemple #2
0
 public void Run_HaveNothingToCopyAndDestinationIsEmpty_DestinationFolderRemoved()
 {
     using (var tempDest = new TemporaryFolder("MirrorMakerDest-special"))
     {
         Directory.Delete(tempDest.Path);
         var specialMaker = new MirrorMaker(_sourceRoot, tempDest.Path);
         specialMaker.Run();
         Assert.IsFalse(Directory.Exists(tempDest.Path));
     }
 }
Exemple #3
0
 [Test] public void Run_HaveSomethingToCopyAndDestinationIsEmpty_DestinationFolderCreated()
 {
     using (var tempDest = new TemporaryFolder("MirrorMakerDest-special"))
     {
         Directory.Delete(tempDest.Path);
         var specialMaker = new MirrorMaker(_sourceRoot, tempDest.Path);
         _sourceTempFolder.GetNewTempFile(true);             //if there's nothing to copy, mws will delete the destination
         specialMaker.Run();
         Assert.IsTrue(Directory.Exists(tempDest.Path));
     }
 }