public void TestGetFormFields() { var localName = "FormFilled.docx"; var remoteName = "TestGetFormFields.docx"; var fullName = Path.Combine(this.dataFolder, remoteName); this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(this.fieldFolder) + localName)); var request = new GetFormFieldsRequest(remoteName, this.dataFolder, nodePath: "sections/0"); FormFieldsResponse actual = this.WordsApi.GetFormFields(request); Assert.AreEqual(200, actual.Code); }
public void TestGetFormFieldsWithoutNodePath() { string remoteFileName = "TestGetFormFieldsWithoutNodePath.docx"; this.UploadFileToStorage( remoteDataFolder + "/" + remoteFileName, null, null, File.ReadAllBytes(LocalTestDataFolder + fieldFolder + "/FormFilled.docx") ); var request = new GetFormFieldsRequest( name: remoteFileName, folder: remoteDataFolder ); var actual = this.WordsApi.GetFormFields(request); Assert.NotNull(actual.FormFields); Assert.NotNull(actual.FormFields.List); Assert.AreEqual(5, actual.FormFields.List.Count); Assert.AreEqual("FullName", actual.FormFields.List[0].Name); }