public void TestGetTableBorders()
        {
            var localName  = "TablesGet.docx";
            var remoteName = "TestGetTableBorders.docx";
            var fullName   = Path.Combine(this.dataFolder, remoteName);

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

            var request = new GetBordersRequest(remoteName, "tables/1/rows/0/cells/0/", this.dataFolder);
            var actual  = this.WordsApi.GetBorders(request);

            Assert.AreEqual(200, actual.Code);
        }
예제 #2
0
        public void TestGetBorders()
        {
            string remoteFileName = "TestGetBorders.docx";

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

            var request = new GetBordersRequest(
                name: remoteFileName,
                nodePath: "tables/1/rows/0/cells/0",
                folder: remoteDataFolder
                );
            var actual = this.WordsApi.GetBorders(request);

            Assert.NotNull(actual.Borders);
            Assert.NotNull(actual.Borders.List);
            Assert.AreEqual(6, actual.Borders.List.Count);
            Assert.NotNull(actual.Borders.List[0].Color);
            Assert.AreEqual("#000000", actual.Borders.List[0].Color.Web);
        }