use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.
the class SecureNodeBuilderTest method testGetNodeStateNonAccessible.
@Test
public void testGetNodeStateNonAccessible() {
NodeState ns = secureNodeBuilder.getChildNode(NAME_NON_ACCESSIBLE).getNodeState();
assertTrue(ns instanceof SecureNodeState);
}
use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.
the class SecureNodeBuilderTest method testGetBaseStateNonAccessible.
@Test
public void testGetBaseStateNonAccessible() {
NodeState ns = secureNodeBuilder.getChildNode(NAME_NON_ACCESSIBLE).getBaseState();
assertTrue(ns instanceof SecureNodeState);
}
use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.
the class SecureNodeBuilderTest method testGetBaseState.
@Test
public void testGetBaseState() {
NodeState ns = secureNodeBuilder.getBaseState();
assertTrue(ns instanceof SecureNodeState);
}
use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.
the class AtomicCounterEditorTest method notCluster.
@Test
public void notCluster() throws CommitFailedException {
NodeBuilder builder;
NodeState before, after;
builder = EMPTY_NODE.builder();
before = builder.getNodeState();
builder = setMixin(builder);
builder = incrementBy(builder, INCREMENT_BY_1);
after = builder.getNodeState();
builder = HOOK_NO_CLUSTER.processCommit(before, after, EMPTY).builder();
assertCounterNodeState(builder, ImmutableSet.of(PREFIX_PROP_COUNTER, PREFIX_PROP_REVISION), 1);
before = builder.getNodeState();
builder = incrementBy(builder, INCREMENT_BY_2);
after = builder.getNodeState();
builder = HOOK_NO_CLUSTER.processCommit(before, after, EMPTY).builder();
assertCounterNodeState(builder, ImmutableSet.of(PREFIX_PROP_COUNTER, PREFIX_PROP_REVISION), 3);
}
use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.
the class ChangeCollectorProviderTest method testNull.
@Test
public void testNull() {
NodeBuilder builder = EMPTY_NODE.builder();
builder.setChildNode("test");
builder.setChildNode("a1").setChildNode("b1").setProperty("p1", 1);
NodeState before = builder.getNodeState();
builder = before.builder();
builder.setChildNode("a2").setChildNode("b12").setProperty("p12", "12");
NodeState after = builder.getNodeState();
assertNull(collectorProvider.getRootValidator(before, after, null));
assertNull(collectorProvider.getRootValidator(before, after, CommitInfo.EMPTY));
assertNotNull(collectorProvider.getRootValidator(before, after, newCommitInfoWithCommitContext(CommitInfo.OAK_UNKNOWN, CommitInfo.OAK_UNKNOWN)));
}
Aggregations