Beispiel #1
0
        public void RecentFileReturnsFolderWrapper(string fileTitleExpected)
        {
            var RecentFolder = FilesControllerHelper.AddToRecent(TestFile.Id);

            Assert.IsNotNull(RecentFolder);
            Assert.AreEqual(fileTitleExpected + ".docx", RecentFolder.Title);
        }
Beispiel #2
0
        public void ShareFileToAnotherUserAddToRecent(string fileTitleExpected, bool notify, string message)
        {
            FilesControllerHelper.SetFileSecurityInfo(TestFile.Id, TestFileShare, notify, message);
            SecurityContext.AuthenticateMe(NewUser.ID);
            var RecentFile = FilesControllerHelper.AddToRecent(TestFile.Id);

            Assert.IsNotNull(RecentFile);
            Assert.AreEqual(fileTitleExpected + ".docx", RecentFile.Title);
        }
Beispiel #3
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);
        }