public void TestGetFormField() { var localName = "FormFilled.docx"; var remoteName = "TestGetFormField.docx"; var fullName = Path.Combine(this.dataFolder, remoteName); int formfieldIndex = 0; this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(this.fieldFolder) + localName)); var request = new GetFormFieldRequest(remoteName, formfieldIndex, this.dataFolder, nodePath: "sections/0"); FormFieldResponse actual = this.WordsApi.GetFormField(request); Assert.AreEqual(200, actual.Code); }
public void TestGetFormFieldWithoutNodePath() { string remoteFileName = "TestGetFormFieldWithoutNodePath.docx"; this.UploadFileToStorage( remoteDataFolder + "/" + remoteFileName, null, null, File.ReadAllBytes(LocalTestDataFolder + fieldFolder + "/FormFilled.docx") ); var request = new GetFormFieldRequest( name: remoteFileName, index: 0, folder: remoteDataFolder ); var actual = this.WordsApi.GetFormField(request); Assert.NotNull(actual.FormField); Assert.AreEqual("FullName", actual.FormField.Name); }