Package org.apache.jackrabbit.mongomk.scenario

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario.create()


                String.valueOf(Integer.MAX_VALUE) /*maxRevisionId*/);
        List<CommitMongo> commits = query.execute();
        assertEquals(MIN_COMMITS, commits.size());

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
        assertEquals(SIMPLE_SCENARIO_COMMITS, commits.size());

        int numberOfChildren = 3;
        scenario.addChildrenToA(numberOfChildren);
View Full Code Here


                String.valueOf(Integer.MAX_VALUE) /*maxRevisionId*/);
        List<CommitMongo> commits = query.execute();
        CommitMongo commit0 = commits.get(0);

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
        CommitMongo commit1 = commits.get(0);
        assertTrue(commit0.getRevisionId() < commit1.getRevisionId());

        int numberOfChildren = 3;
View Full Code Here

        CommitMongo commit0 = commits.get(0);

        Thread.sleep(1000);

        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();
        commits = query.execute();
        CommitMongo commit1 = commits.get(0);
        assertTrue(commit0.getTimestamp() < commit1.getTimestamp());

        Thread.sleep(1000);
View Full Code Here

    }

    @Test
    public void maxEntriesDefaultLimitless() throws Exception {
        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();

        int numberOfChildren = 2;
        scenario.addChildrenToA(numberOfChildren);

        int maxEntries = 0;
View Full Code Here

    }

    @Test
    public void maxEntries() throws Exception {
        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        scenario.create();

        int numberOfChildren = 2;
        scenario.addChildrenToA(numberOfChildren);

        int maxEntries = 2;
View Full Code Here

public class GetNodesCommandMongoTest extends BaseMongoTest {

    @Test
    public void testGetNodesAfterDeletion() throws Exception {
        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        String revisionId = scenario.create();
        revisionId = scenario.delete_A();

        GetNodesCommandMongo command = new GetNodesCommandMongo(mongoConnection, "/", revisionId, -1);
        Node actual = command.execute();
        Node expected = NodeBuilder.build(String.format("{ \"/#%1$s\" : {} }", revisionId));
View Full Code Here

    }

    @Test
    public void testSimpleGetNodes() throws Exception {
        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        String firstRevisionId = scenario.create();
        String secondRevisionId = scenario.update_A_and_add_D_and_E();

        GetNodesCommandMongo command = new GetNodesCommandMongo(mongoConnection, "/", firstRevisionId, 0);
        Node actual = command.execute();
        Node expected = NodeBuilder.build(String.format("{ \"/#%1$s\" : { \"a\" : {} } }",
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.