public void TestGetDocumentProperty() { var localName = "test_multi_pages.docx"; var remoteName = "TestGetDocumentProperty.docx"; var fullName = Path.Combine(this.dataFolder, remoteName); string propertyName = "Author"; this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(BaseTestContext.CommonFolder) + localName)); var request = new GetDocumentPropertyRequest(remoteName, propertyName, this.dataFolder); var actual = this.WordsApi.GetDocumentProperty(request); Assert.AreEqual(200, actual.Code); }
public void TestGetDocumentProperty() { string remoteFileName = "TestGetDocumentProperty.docx"; this.UploadFileToStorage( remoteDataFolder + "/" + remoteFileName, null, null, File.ReadAllBytes(LocalTestDataFolder + localFile) ); var request = new GetDocumentPropertyRequest( name: remoteFileName, propertyName: "Author", folder: remoteDataFolder ); var actual = this.WordsApi.GetDocumentProperty(request); Assert.NotNull(actual.DocumentProperty); Assert.AreEqual("Author", actual.DocumentProperty.Name); Assert.AreEqual("", actual.DocumentProperty.Value); }