Esempio n. 1
0
        public async Task DeleteSharedFileReturnsFolderWrapperReadAndWrite(bool deleteAfter, bool immediately)
        {
            SecurityContext.AuthenticateMe(NewUser.ID);
            var result = FilesControllerHelper.DeleteFile(
                TestFileReadAndWrite.Id,
                deleteAfter,
                immediately)
                         .FirstOrDefault();

            await WaitLongOperation(result, FilesCommonResource.ErrorMassage_SecurityException_DeleteFile);
        }
Esempio n. 2
0
        public void DeleteFile(int file)
        {
            FilesControllerHelper.DeleteFile(file, false, true);
            while (true)
            {
                var statuses = FileStorageService.GetTasksStatuses();

                if (statuses.TrueForAll(r => r.Finished))
                {
                    break;
                }
                Thread.Sleep(100);
            }
        }
Esempio n. 3
0
        public void DeleteFileReturnsFileWrapper(bool deleteAfter, bool immediately)
        {
            FilesControllerHelper.DeleteFile(
                TestFile.Id,
                deleteAfter,
                immediately);

            while (true)
            {
                var statuses = FileStorageService.GetTasksStatuses();

                if (statuses.TrueForAll(r => r.Finished))
                {
                    break;
                }
                Thread.Sleep(100);
            }
            Assert.IsTrue(FileStorageService.GetTasksStatuses().TrueForAll(r => string.IsNullOrEmpty(r.Error)));
        }
Esempio n. 4
0
        public void DeleteRecentFileReturnsFolderWrapper(string fileTitleExpected)
        {
            var RecentFolder = FilesControllerHelper.AddToRecent(TestFile.Id);

            FilesControllerHelper.DeleteFile(
                TestFile.Id,
                false,
                true);

            while (true)
            {
                var statuses = FileStorageService.GetTasksStatuses();

                if (statuses.TrueForAll(r => r.Finished))
                {
                    break;
                }
                Thread.Sleep(100);
            }
            Assert.IsNotNull(RecentFolder);
            Assert.AreEqual(fileTitleExpected + ".docx", RecentFolder.Title);
        }