コード例 #1
0
        public void TestInsertTableCell()
        {
            var localName  = "TablesGet.docx";
            var remoteName = "TestInsertTableCell.docx";
            var fullName   = Path.Combine(this.dataFolder, remoteName);
            var cell       = new TableCellInsert();

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

            var request = new InsertTableCellRequest(remoteName, "sections/0/tables/2/rows/0", this.dataFolder, cell: cell);
            var actual  = this.WordsApi.InsertTableCell(request);

            Assert.AreEqual(200, actual.Code);
        }
コード例 #2
0
        public void TestInsertTableCell()
        {
            string remoteFileName = "TestInsertTableCell.docx";

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

            var request = new InsertTableCellRequest(
                name: remoteFileName,
                tableRowPath: "sections/0/tables/2/rows/0",
                cell: new TableCellInsert()
            {
            },
                folder: remoteDataFolder
                );
            var actual = this.WordsApi.InsertTableCell(request);

            Assert.NotNull(actual.Cell);
            Assert.AreEqual("0.0.5.0.3", actual.Cell.NodeId);
        }