示例#1
0
        public void TestDeleteDrawingObject()
        {
            var localName   = "test_multi_pages.docx";
            var remoteName  = "TestDeleteDrawingObject.docx";
            var fullName    = Path.Combine(this.dataFolder, remoteName);
            int objectIndex = 0;

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

            var request = new DeleteDrawingObjectRequest(remoteName, objectIndex, this.dataFolder);
            var actual  = this.WordsApi.DeleteDrawingObject(request);

            Assert.AreEqual(200, actual.Code);
        }
示例#2
0
        public void TestDeleteDrawingObjectWithoutNodePath()
        {
            string remoteFileName = "TestDeleteDrawingObjectWithoutNodePath.docx";

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

            var request = new DeleteDrawingObjectRequest(
                name: remoteFileName,
                index: 0,
                folder: remoteDataFolder
                );

            this.WordsApi.DeleteDrawingObject(request);
        }