public void TestGetSection()
        {
            var localName    = "test_multi_pages.docx";
            var remoteName   = "[“Test_Two,_Inc.”]-_83(b)Election([“Bill_Gates”]).docx";
            var fullName     = Path.Combine(this.dataFolder, remoteName);
            var sectionIndex = 0;

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

            var request = new GetSectionRequest(remoteName, sectionIndex, this.dataFolder);
            var actual  = this.WordsApi.GetSection(request);
        }
Ejemplo n.º 2
0
        public SectionInfo GetSection(Identifier orgUnitId)
        {
            GetSectionRequest request = new GetSectionRequest()
            {
                OrgUnitId = orgUnitId
            };
            GetSectionResponse response = CallWebService <
                IOrgUnitManagementServicev1_0, GetSectionRequest, GetSectionResponse>(
                m_service1_0, request, (s, q) => s.GetSection(q));

            return(response.Section);
        }
Ejemplo n.º 3
0
        public void TestGetSection()
        {
            var localName    = "test_multi_pages.docx";
            var remoteName   = "TestGetSection.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 GetSectionRequest(remoteName, sectionIndex, this.dataFolder);
            var actual  = this.WordsApi.GetSection(request);

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

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

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

            Assert.NotNull(actual.Section);
            Assert.NotNull(actual.Section.ChildNodes);
            Assert.AreEqual(13, actual.Section.ChildNodes.Count);
            Assert.AreEqual("0.3.0", actual.Section.ChildNodes[0].NodeId);
        }