Package org.apache.jackrabbit.oak.plugins.document.impl

Examples of org.apache.jackrabbit.oak.plugins.document.impl.SimpleNodeScenario.create()


public class DocumentMKNodeExistsTest extends BaseDocumentMKTest {

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

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

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


    }

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

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

        scenario.deleteA();
View Full Code Here

    }

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

        try {
            mk.nodeExists("/a", "123456789");
            fail("Expected: Invalid revision id exception");
        } catch (Exception expected) {
View Full Code Here

    }

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

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

        scenario.deleteA();
View Full Code Here

    }

    @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);
View Full Code Here

    }

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

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

public class DocumentMKGetHeadRevisionTest extends BaseDocumentMKTest {

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

        String rev2 = mk.getHeadRevision();
        assertEquals(rev1, rev2);

        String rev3 = scenario.deleteA();
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.