Example #1
0
        public void TestInsertTableRow()
        {
            string remoteFileName = "TestInsertTableRow.docx";

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

            var request = new InsertTableRowRequest(
                name: remoteFileName,
                tablePath: "sections/0/tables/2",
                row: new TableRowInsert()
            {
                ColumnsCount = 5
            },
                folder: remoteDataFolder
                );
            var actual = this.WordsApi.InsertTableRow(request);

            Assert.NotNull(actual.Row);
            Assert.NotNull(actual.Row.TableCellList);
            Assert.AreEqual(5, actual.Row.TableCellList.Count);
        }
        public void TestInsertTableRow()
        {
            var localName  = "TablesGet.docx";
            var remoteName = "TestInsertTableRow.docx";
            var fullName   = Path.Combine(this.dataFolder, remoteName);
            var row        = new TableRowInsert {
                ColumnsCount = 5
            };

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

            var request = new InsertTableRowRequest(remoteName, "sections/0/tables/2", this.dataFolder, row: row);
            var actual  = this.WordsApi.InsertTableRow(request);

            Assert.AreEqual(200, actual.Code);
        }