Package org.codehaus.swizzle.confluence

Examples of org.codehaus.swizzle.confluence.PageHistorySummary


        // check page history
        List oldVersions = this.rpc.getPageHistory(id);
        assertEquals(2, oldVersions.size());

        PageHistorySummary phs0 = (PageHistorySummary) oldVersions.get(0);
        assertEquals(resultPage.getVersion(), phs0.getVersion());
        assertNotNull(phs0.getModified());
        assertNotNull(phs0.getId());

        Page page0 = this.rpc.getPage(phs0.getId());
        assertEquals(page.getContent(), page0.getContent());
        assertEquals(page.getVersion(), page0.getVersion());

        // search for the page
        // List searchResults = rpc.search(title, 1);
View Full Code Here


        Page page3 = this.rpc.storePage(p);

        // get page history
        List historyObjs = this.rpc.getPageHistory(page3.getId());
        assertEquals(3, historyObjs.size());
        PageHistorySummary phs1 = (PageHistorySummary) historyObjs.get(1);
        assertEquals(page1.getVersion() + 1, phs1.getVersion());

        // This ensures that getting the page from XmlRpc uses the date of the version, and not the current date
        // See XWIKI-2821
        Thread.sleep(2000);

        Page p1 = this.rpc.getPage(phs1.getId());
        assertEquals(page2.getVersion(), p1.getVersion());
        assertEquals(page2.getContent(), p1.getContent());
        assertEquals(page2.getCreated(), p1.getCreated());
        assertEquals(page2.getCreator(), p1.getCreator());
        assertEquals(page2.getModified(), p1.getModified());
        assertEquals(page2.getModifier(), p1.getModifier());
        assertEquals(page2.getParentId(), p1.getParentId());
       
        assertEquals(page2.getSpace(), p1.getSpace());
        assertEquals(page2.getTitle(), p1.getTitle());
        // assertFalse(page2.getUrl().equals(p1.getUrl()));

        PageHistorySummary phs2 = (PageHistorySummary) historyObjs.get(0);
        // assertEquals(page3.getVersion(), phs2.getVersion());
        Page p2 = this.rpc.getPage(phs2.getId());
        // assertEquals(page3.getVersion(), p2.getVersion());
        // assertEquals(page3.getContent(), p2.getContent());
        // assertEquals(page3.getCreated(), p2.getCreated());
        // assertEquals(page3.getCreator(), p2.getCreator());
        // assertEquals(page3.getModified(), p2.getModified());
View Full Code Here

TOP

Related Classes of org.codehaus.swizzle.confluence.PageHistorySummary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.