Examples of SimpleNodeScenario


Examples of org.apache.jackrabbit.mongomk.impl.SimpleNodeScenario

        assertTrue("The node a is not found in the head revision!", exists);
    }

    @Test
    public void existsInOldRevNotInNewRev() throws Exception {
        SimpleNodeScenario scenario = new SimpleNodeScenario(mk);
        String rev1 = scenario.create();
        String rev2 = scenario.deleteA();

        boolean exists = mk.nodeExists("/a", rev1);
        assertTrue(exists);

        exists = mk.nodeExists("/a", rev2);
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.impl.SimpleNodeScenario

        assertFalse(exists);
    }

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

        scenario.deleteB();
        boolean exists = mk.nodeExists("/a/b", null);
        assertFalse(exists);

        exists = mk.nodeExists("/a/c", null);
        assertTrue(exists);
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario

@SuppressWarnings("javadoc")
public class GetHeadRevisionCommandMongoTest extends BaseMongoTest {

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

        GetHeadRevisionCommandMongo command = new GetHeadRevisionCommandMongo(mongoConnection);
        String revisionId2 = command.execute();
        assertTrue(revisionId.equals(revisionId2));

        scenario.delete_A();
        String revisionId3 = command.execute();
        assertFalse(revisionId3.equals(revisionId2));
    }}
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario

@SuppressWarnings("javadoc")
public class NodeExistsCommandMongoTest extends BaseMongoTest {

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

        NodeExistsCommandMongo command = new NodeExistsCommandMongo(
                mongoConnection, "/a", revisionId);
        boolean exists = command.execute();
        assertTrue(exists);

        command = new NodeExistsCommandMongo(mongoConnection, "/a/b",
                revisionId);
        exists = command.execute();
        assertTrue(exists);

        revisionId = scenario.delete_A();

        command = new NodeExistsCommandMongo(mongoConnection, "/a", revisionId);
        exists = command.execute();
        assertFalse(exists);
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario

        assertFalse(exists);
    }

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

        NodeExistsCommandMongo command = new NodeExistsCommandMongo(
                mongoConnection, "/a", null /* revisionId */);
        boolean exists = command.execute();
        assertTrue(exists);

        scenario.delete_A();

        command = new NodeExistsCommandMongo(mongoConnection, "/a", null /* revisionId */);
        exists = command.execute();
        assertFalse(exists);
    }
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario

        assertFalse(exists);
    }

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

        NodeExistsCommandMongo command = new NodeExistsCommandMongo(
                mongoConnection, "/a", "123456789");
        try {
            command.execute();
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario

        }
    }

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

        NodeExistsCommandMongo command = new NodeExistsCommandMongo(
                mongoConnection, "/a/b", null);
        boolean exists = command.execute();
        assertTrue(exists);

        scenario.delete_A();
        command = new NodeExistsCommandMongo(mongoConnection, "/a/b", null);
        exists = command.execute();
        assertFalse(exists);
    }
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario

        assertTrue("The node a is not found in the head revision!", exists);
    }

    @Test
    public void existsInOldRevNotInNewRev() throws Exception {
        SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
        String rev1 = scenario.create();
        String rev2 = scenario.delete_A();

        NodeExistsCommandMongo command = new NodeExistsCommandMongo(
                mongoConnection, "/a", rev1);
        boolean exists = command.execute();
        assertTrue(exists);
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario

        assertFalse(exists);
    }

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

        scenario.delete_B();
        NodeExistsCommandMongo command = new NodeExistsCommandMongo(
                mongoConnection, "/a/b", null);
        boolean exists = command.execute();
        assertFalse(exists);
View Full Code Here

Examples of org.apache.jackrabbit.mongomk.scenario.SimpleNodeScenario

public class FetchNodesForRevisionQueryTest extends BaseMongoTest {

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

        DBCollection commitCollection = mongoConnection.getCommitCollection();
        DBObject q = QueryBuilder.start(CommitMongo.KEY_REVISION_ID)
                .is(MongoUtil.toMongoRepresentation(secondRevisionId)).get();
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.