Пример #1
0
        public void TestGetDocumentFieldNames()
        {
            var localName  = "test_multi_pages.docx";
            var remoteName = "TestGetDocumentFieldNames.docx";
            var fullName   = Path.Combine(this.dataFolder, remoteName);

            this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(BaseTestContext.CommonFolder) + localName));

            var request = new GetDocumentFieldNamesRequest(remoteName, this.dataFolder);
            var actual  = this.WordsApi.GetDocumentFieldNames(request);

            Assert.AreEqual(200, actual.Code);
        }
Пример #2
0
        public void TestGetDocumentFieldNames()
        {
            string remoteFileName = "TestGetDocumentFieldNames.docx";

            this.UploadFileToStorage(
                remoteDataFolder + "/" + remoteFileName,
                null,
                null,
                File.ReadAllBytes(LocalTestDataFolder + "Common/test_multi_pages.docx")
                );

            var request = new GetDocumentFieldNamesRequest(
                name: remoteFileName,
                folder: remoteDataFolder
                );
            var actual = this.WordsApi.GetDocumentFieldNames(request);

            Assert.NotNull(actual.FieldNames);
            Assert.NotNull(actual.FieldNames.Names);
            Assert.AreEqual(0, actual.FieldNames.Names.Count);
        }