Package org.codehaus.swizzle.confluence

Examples of org.codehaus.swizzle.confluence.Space


    public void setUp() throws Exception
    {
        super.setUp();

        spaceKey = "SomeContainerSpace";
        Space space = new Space();
        space.setKey(spaceKey);
        space.setName("Some Name");

        try {
            rpc.addSpace(space);
        } catch (Exception e) {
            // Now we throw exception if the space already exists
View Full Code Here


    }

    public void testGetSpace() throws Exception
    {
        List<SpaceSummary> spaces = rpc.getSpaces();
        Space space = rpc.getSpace(spaces.get(0).getKey());

        TestUtils.banner("TEST: getSpaceTest()");
        System.out.format("%s\n", space);

        assertEquals(space.getKey(), spaces.get(0).getKey());
    }
View Full Code Here

    }

    public void testGetNonExistingSpace() throws Exception
    {
        try {
            Space space = rpc.getSpace("thisSpaceShouldNotExist");
            Assert.fail();
        } catch (XmlRpcException e) {
        }
    }
View Full Code Here

        }
    }

    public void testAddSpace() throws Exception
    {
        Space space = new Space();
        space.setKey(String.format("%s-%d", TestConstants.TEST_PREFIX, Math.abs(random.nextInt())));
        space.setName("TEST Space");

        space = rpc.addSpace(space);

        TestUtils.banner("TEST: addSpace()");
        System.out.format("%s\n", space);

        List<SpaceSummary> spaces = rpc.getSpaces();
        boolean found = false;
        for (SpaceSummary spaceSummary : spaces) {
            if (spaceSummary.getKey().equals(space.getKey())) {
                found = true;
                break;
            }
        }
View Full Code Here

        Assert.assertTrue(found);
    }

    public void testAddDuplicatedSpace() throws Exception
    {
        Space space = new Space();
        space.setKey(String.format("%s-%d", TestConstants.TEST_PREFIX, Math.abs(random.nextInt())));
        space.setName("TEST Space");

        try {
            space = rpc.addSpace(space);
            space = rpc.addSpace(space);
            Assert.fail();
View Full Code Here

            System.out.format("User admin can always access everything\n");
            return;
        }

        try {
            Space space = rpc.getSpace(TestConstants.SPACE_WITH_NO_ACCESS_RIGHTS);
        } catch (XmlRpcException e) {
        }
    }
View Full Code Here

    public void setUp() throws Exception
    {
        super.setUp();

        this.spaceKey = "ContainerSpace";
        Space space = new Space();
        space.setKey(this.spaceKey);
        space.setName("Some Name");
        this.rpc.addSpace(space);
    }
View Full Code Here

    }

    public void testGetSpace() throws Exception
    {
        List<SpaceSummary> spaces = rpc.getSpaces();
        Space space = rpc.getSpace(spaces.get(0).getKey());

        TestUtils.banner("TEST: getSpaceTest()");
        System.out.format("%s\n", space);

        assertEquals(space.getKey(), spaces.get(0).getKey());
    }
View Full Code Here

    }

    public void testGetNonExistingSpace() throws Exception
    {
        try {
            Space space = rpc.getSpace("thisSpaceShouldNotExist");
            Assert.fail();
        } catch (XmlRpcException e) {
        }
    }
View Full Code Here

        }
    }

    public void testAddSpace() throws Exception
    {
        Space space = new Space();
        space.setKey(String.format("%s-%d", TestConstants.TEST_PREFIX, Math.abs(random.nextInt())));
        space.setName("TEST Space");

        space = rpc.addSpace(space);

        TestUtils.banner("TEST: addSpace()");
        System.out.format("%s\n", space);

        List<SpaceSummary> spaces = rpc.getSpaces();
        boolean found = false;
        for (SpaceSummary spaceSummary : spaces) {
            if (spaceSummary.getKey().equals(space.getKey())) {
                found = true;
                break;
            }
        }
View Full Code Here

TOP

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

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.