Exemplo n.º 1
0
        public void TestGetSectionPageSetup()
        {
            var localName    = "test_multi_pages.docx";
            var remoteName   = "TestGetSectionPageSetup.docx";
            var fullName     = Path.Combine(this.dataFolder, remoteName);
            var sectionIndex = 0;

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

            var request = new GetSectionPageSetupRequest(remoteName, sectionIndex, this.dataFolder);
            var actual  = this.WordsApi.GetSectionPageSetup(request);

            Assert.AreEqual(200, actual.Code);
        }
        public void TestGetSectionPageSetup()
        {
            string remoteFileName = "TestGetSectionPageSetup.docx";

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

            var request = new GetSectionPageSetupRequest(
                name: remoteFileName,
                sectionIndex: 0,
                folder: remoteDataFolder
                );
            var actual = this.WordsApi.GetSectionPageSetup(request);

            Assert.NotNull(actual.PageSetup);
            Assert.AreEqual(1, actual.PageSetup.LineStartingNumber);
        }