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"); }
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); }
public void UpdateFileReturnsFileWrapper(string fileTitle, int lastVersion) { var fileWrapper = FilesControllerHelper.UpdateFile( TestFile.Id, fileTitle, lastVersion); Assert.IsNotNull(fileWrapper); Assert.AreEqual(fileTitle + ".docx", fileWrapper.Title); }