Exemplo n.º 1
0
        public void UpdateSharedFileReturnsFolderWrapperRead(string fileTitle, int lastVersion)
        {
            SecurityContext.AuthenticateMe(NewUser.ID);
            var fileWrapper = Assert.Throws <InvalidOperationException>(() => FilesControllerHelper.UpdateFile(TestFileRead.Id, fileTitle, lastVersion));

            Assert.That(fileWrapper.Message == "You don't have enough permission to rename the file");
        }
Exemplo n.º 2
0
        public void UpdateSharedFileReturnsFolderWrapperReadAndWrite(string fileTitle, int lastVersion)
        {
            SecurityContext.AuthenticateMe(NewUser.ID);
            var fileWrapper = FilesControllerHelper.UpdateFile(TestFileReadAndWrite.Id, fileTitle, lastVersion);

            Assert.IsNotNull(fileWrapper);
            Assert.AreEqual(fileTitle + ".docx", fileWrapper.Title);
        }
Exemplo n.º 3
0
        public void UpdateFileReturnsFileWrapper(string fileTitle, int lastVersion)
        {
            var fileWrapper = FilesControllerHelper.UpdateFile(
                TestFile.Id,
                fileTitle,
                lastVersion);

            Assert.IsNotNull(fileWrapper);
            Assert.AreEqual(fileTitle + ".docx", fileWrapper.Title);
        }