Package org.codehaus.swizzle.confluence

Examples of org.codehaus.swizzle.confluence.SpaceSummary


    }

    public void testRemoveSpace() throws Exception
    {
        List<SpaceSummary> spaces = rpc.getSpaces();
        SpaceSummary spaceToBeRemoved = null;
        for (SpaceSummary spaceSummary : spaces) {
            if (spaceSummary.getKey().startsWith(TestConstants.TEST_PREFIX)) {
                spaceToBeRemoved = spaceSummary;
                break;
            }
        }

        Boolean result = rpc.removeSpace(spaceToBeRemoved.getKey());

        TestUtils.banner("TEST: removeSpace()");
        System.out.format("%s removed: %b\n", spaceToBeRemoved.getKey(), result);

        boolean found = false;
        spaces = rpc.getSpaces();
        for (SpaceSummary spaceSummary : spaces) {
            if (spaceSummary.getKey().equals(spaceToBeRemoved.getKey())) {
                System.out.format("Page still existing: %s\n", spaceSummary);
                found = true;
                break;
            }
        }
View Full Code Here


    public void testReadSomePagesWhenNotLoggedIn() throws Exception
    {
        List spaces = rpc.getSpaces();
        for (int i = 0; i < spaces.size(); i++) {
            SpaceSummary spaceSummary = (SpaceSummary) spaces.get(i);
            String key = spaceSummary.getKey();

            // Only read pages from the Main space in this test since we're sure Guest users
            // are allowed to read them.
            if (key.equals("Main")) {
                List pages = rpc.getPages(key);
View Full Code Here

    }

    public void testRemoveSpace() throws Exception
    {
        List<SpaceSummary> spaces = rpc.getSpaces();
        SpaceSummary spaceToBeRemoved = null;
        for (SpaceSummary spaceSummary : spaces) {
            if (spaceSummary.getKey().startsWith(TestConstants.TEST_PREFIX)) {
                spaceToBeRemoved = spaceSummary;
                break;
            }
        }

        Boolean result = rpc.removeSpace(spaceToBeRemoved.getKey());

        TestUtils.banner("TEST: removeSpace()");
        System.out.format("%s removed: %b\n", spaceToBeRemoved.getKey(), result);

        boolean found = false;
        spaces = rpc.getSpaces();
        for (SpaceSummary spaceSummary : spaces) {
            if (spaceSummary.getKey().equals(spaceToBeRemoved.getKey())) {
                System.out.format("Page still existing: %s\n", spaceSummary);
                found = true;
                break;
            }
        }
View Full Code Here

        rpc.removeSpace(spaceKey);

        List spaces = rpc.getSpaces();
        boolean found = false;
        for (int i = 0; i < spaces.size() && !found; i++) {
            SpaceSummary summary = (SpaceSummary) spaces.get(i);
            if (summary.getKey().equals(spaceKey)) {
                found = true;
            }
        }
        assertFalse("Remove space failed (" + spaceKey + " still present)", found);
    }
View Full Code Here

TOP

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

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.