Example #1
0
        public void CreateFolderReturnsFolderWrapper(string folderTitle)
        {
            var folderWrapper = FilesControllerHelper.CreateFolder(GlobalFolderHelper.FolderMy, folderTitle);

            Assert.IsNotNull(folderWrapper);
            Assert.AreEqual(folderTitle, folderWrapper.Title);
            DeleteFolder(folderWrapper.Id);
        }
Example #2
0
        public override void SetUp()
        {
            base.SetUp();

            TestFolder         = FilesControllerHelper.CreateFolder(GlobalFolderHelper.FolderMy, "TestFolder");
            TestFolderNotEmpty = FilesControllerHelper.CreateFolder(GlobalFolderHelper.FolderMy, "TestFolderNotEmpty");
            FilesControllerHelper.CreateFile(TestFolderNotEmpty.Id, "TestFileToContentInTestFolder", default);
            FilesControllerHelper.CreateFolder(TestFolderNotEmpty.Id, "TestFolderToContentInTestFolder");
            TestFile = FilesControllerHelper.CreateFile(GlobalFolderHelper.FolderMy, "TestFile", default);
        }
Example #3
0
 public override void SetUp()
 {
     base.SetUp();
     TestFolder = FilesControllerHelper.CreateFolder(GlobalFolderHelper.FolderMy, "TestFolder");
     TestFile   = FilesControllerHelper.CreateFile(GlobalFolderHelper.FolderMy, "TestFile", default);
     folderIds  = new List <int> {
         TestFolder.Id
     };
     fileIds = new List <int> {
         TestFile.Id
     };
 }
Example #4
0
 public override void SetUp()
 {
     base.SetUp();
     TestFolder    = FilesControllerHelper.CreateFolder(GlobalFolderHelper.FolderMy, "TestFolder");
     TestFile      = FilesControllerHelper.CreateFile(GlobalFolderHelper.FolderMy, "TestFile", default);
     NewUser       = UserManager.GetUsers(Guid.Parse("005bb3ff-7de3-47d2-9b3d-61b9ec8a76a5"));
     TestFileShare = new List <FileShareParams> {
         new FileShareParams {
             Access = Core.Security.FileShare.Read, ShareTo = NewUser.ID
         }
     };
 }
Example #5
0
        public void CreateFolderReturnsFolderWrapper(string folderTitle)
        {
            var folderWrapper = Assert.Throws <InvalidOperationException>(() => FilesControllerHelper.CreateFolder((int)GlobalFolderHelper.FolderTrash, folderTitle));

            Assert.That(folderWrapper.Message == "You don't have enough permission to create");
        }
Example #6
0
 public override void SetUp()
 {
     base.SetUp();
     TestFolder = FilesControllerHelper.CreateFolder(GlobalFolderHelper.FolderMy, "TestFolder");
     TestFile   = FilesControllerHelper.CreateFile(GlobalFolderHelper.FolderMy, "TestFile", default);
 }