Examples of compareAgainstBaseState()


Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

            private NodeState baseLine = store.getRoot();

            @Override
            public void getChanges(NodeStateDiff diff) {
                NodeState head = store.getRoot();
                head.compareAgainstBaseState(baseLine, diff);
                baseLine = head;
            }
        };
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

            log.error(errorMsg, e);
            throw new RuntimeException(e);
        }

        NodeState target = store.getRoot();
        target.compareAgainstBaseState(base, new ApplyDiff(builder));
    }

}
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

        NodeState after = persist(builder);

        expect(diff.propertyDeleted(before.getProperty("foo"))).andReturn(true);
        replay(diff);

        after.compareAgainstBaseState(before, diff);
        verify(diff);
    }

    @Test
    public void testChildNodeAdded() {
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

        NodeState after = persist(builder);

        expect(diff.childNodeAdded("test", after.getChildNode("test"))).andReturn(true);
        replay(diff);

        after.compareAgainstBaseState(before, diff);
        verify(diff);
    }

    @Test
    public void testChildNodeChanged() {
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

        expect(diff.childNodeChanged(
                "baz", before.getChildNode("baz"), after.getChildNode("baz"))).andReturn(true);
        replay(diff);

        after.compareAgainstBaseState(before, diff);
        verify(diff);
    }

    @Test
    public void testChildNodeDeleted() {
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

        NodeState after = persist(builder);

        expect(diff.childNodeDeleted("baz", before.getChildNode("baz"))).andReturn(true);
        replay(diff);

        after.compareAgainstBaseState(before, diff);
        verify(diff);
    }

    private NodeState persist(NodeBuilder builder) {
        NodeState state = writer.writeNode(builder.getNodeState());
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

    public void testSameState() {
        NodeState node = persist(builder);

        replay(diff);

        node.compareAgainstBaseState(node, diff);
        verify(diff);
    }

    @Test
    public void testEqualState() {
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

        NodeState before = persist(builder);
        NodeState after = persist(builder);

        replay(diff);

        after.compareAgainstBaseState(before, diff);
        verify(diff);
    }

    @Test
    public void testPropertyAdded() {
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

        NodeState after = persist(builder);

        expect(diff.propertyAdded(after.getProperty("test"))).andReturn(true);
        replay(diff);

        after.compareAgainstBaseState(before, diff);
        verify(diff);
    }

    @Test
    public void testPropertyChanged() {
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.state.NodeState.compareAgainstBaseState()

        expect(diff.propertyChanged(
                before.getProperty("foo"), after.getProperty("foo"))).andReturn(true);
        replay(diff);

        after.compareAgainstBaseState(before, diff);
        verify(diff);
    }

    @Test
    public void testPropertyDeleted() {
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.