Пример #1
0
        public void DeleteFileTopLevel()  // Deletes existing file at the Top Level
        {
            FolderRepository uploadRepository = new FolderRepository($@"{Utils.GetSetupDir()}\UploadFolder");

            uploadRepository.Delete("File1.txt", false);
            DbRepository dbRepository = new DbRepository("DbFolder");

            dbRepository.Delete("File1.txt", false);
            List <Storage> difference = Utils.Compare(dbRepository, uploadRepository, "");

            Assert.AreEqual(0, difference.Count, "There should be no difference between repositories");
        }
Пример #2
0
        public void DeleteFolderTopLevel()  // Deletes Top Level folder (i.e Folder1) and its content
        {
            FolderRepository uploadRepository = new FolderRepository($@"{Utils.GetSetupDir()}\UploadFolder");

            uploadRepository.Delete("Folder1", true);
            DbRepository dbRepository = new DbRepository("DbFolder");

            dbRepository.Delete("Folder1", true);
            List <Storage> difference = Utils.Compare(dbRepository, uploadRepository, "");

            Assert.AreEqual(0, difference.Count, "There should be no difference between repositories");
        }
Пример #3
0
        public void DeleteFolderInner()  // Delete's Folder2 and its content inside Folder1
        {
            FolderRepository uploadRepository = new FolderRepository($@"{Utils.GetSetupDir()}\UploadFolder");

            uploadRepository.Delete(@"Folder1\Folder2", true);
            DbRepository dbRepository = new DbRepository("DbFolder");

            dbRepository.Delete(@"Folder1\Folder2", true);
            List <Storage> difference = Utils.Compare(dbRepository, uploadRepository, "");

            Assert.AreEqual(0, difference.Count, "There should be no difference between repositories");
        }
Пример #4
0
        public void DeleteFileInner()  // Deletes existing File inside the Folder1
        {
            FolderRepository uploadRepository = new FolderRepository($@"{Utils.GetSetupDir()}\UploadFolder");

            uploadRepository.Delete(@"Folder1\File2.txt", false);
            DbRepository dbRepository = new DbRepository("DbFolder");

            dbRepository.Delete(@"Folder1\File2.txt", false);
            List <Storage> difference = Utils.Compare(dbRepository, uploadRepository, "");

            Assert.AreEqual(0, difference.Count, "There should be no difference between repositories");
        }
Пример #5
0
        public void DeleteNewFolderTopLevel()  // Delete newly created folder at the Top level
        {
            CreateFolderTopLevel();
            FolderRepository uploadRepository = new FolderRepository($@"{Utils.GetSetupDir()}\UploadFolder");

            uploadRepository.Delete(@"Dutta", true);
            DbRepository dbRepository = new DbRepository("DbFolder");

            dbRepository.Delete(@"Dutta", true);
            List <Storage> difference = Utils.Compare(dbRepository, uploadRepository, "");

            Assert.AreEqual(0, difference.Count, "There should be no difference between repositories");
        }