public void TestUpdateTableRowFormat() { string remoteFileName = "TestUpdateTableRowFormat.docx"; this.UploadFileToStorage( remoteDataFolder + "/" + remoteFileName, null, null, File.ReadAllBytes(LocalTestDataFolder + localFile) ); var request = new UpdateTableRowFormatRequest( name: remoteFileName, tablePath: "sections/0/tables/2", index: 0, format: new TableRowFormat() { AllowBreakAcrossPages = true, HeadingFormat = true, Height = 10.0f, HeightRule = TableRowFormat.HeightRuleEnum.Exactly }, folder: remoteDataFolder ); var actual = this.WordsApi.UpdateTableRowFormat(request); Assert.NotNull(actual.RowFormat); Assert.AreEqual(true, actual.RowFormat.AllowBreakAcrossPages); Assert.AreEqual(true, actual.RowFormat.HeadingFormat); Assert.AreEqual(10.0f, actual.RowFormat.Height); }
public void TestUpdateTableRowFormat() { var localName = "TablesGet.docx"; var remoteName = "TestUpdateTableRowFormat.docx"; var fullName = Path.Combine(this.dataFolder, remoteName); var rowFormat = new TableRowFormat { AllowBreakAcrossPages = true, HeadingFormat = true, Height = 10, HeightRule = TableRowFormat.HeightRuleEnum.Auto }; this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(this.tableFolder) + localName)); var request = new UpdateTableRowFormatRequest(remoteName, "sections/0/tables/2", 0, this.dataFolder, format: rowFormat); var actual = this.WordsApi.UpdateTableRowFormat(request); Assert.AreEqual(200, actual.Code); }