Search in sources :

Example 56 with NodeState

use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.

the class NodeTypePredicateTest method multipleNodeTypesMatch.

@Test
public void multipleNodeTypesMatch() {
    NodeState node = createNodeOfType(NT_FILE);
    TypePredicate p = new TypePredicate(node, new String[] { NT_FOLDER, NT_RESOURCE, NT_FILE });
    assertTrue(p.apply(node));
}
Also used : NodeState(org.apache.jackrabbit.oak.spi.state.NodeState) TypePredicate(org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate) Test(org.junit.Test)

Example 57 with NodeState

use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.

the class NodeTypePredicateTest method multipleNodeTypesMiss.

@Test
public void multipleNodeTypesMiss() {
    NodeState node = createNodeOfType(NT_FILE);
    TypePredicate p = new TypePredicate(node, new String[] { NT_FOLDER, NT_RESOURCE, JCR_CONTENT });
    assertFalse(p.apply(node));
}
Also used : NodeState(org.apache.jackrabbit.oak.spi.state.NodeState) TypePredicate(org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate) Test(org.junit.Test)

Example 58 with NodeState

use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.

the class UuidPredicateTest method singleUuidMiss.

@Test
public void singleUuidMiss() {
    UuidPredicate p = new UuidPredicate(new String[] { generateUUID() });
    NodeState tree = createNodeWithUuid(generateUUID());
    assertFalse(p.apply(tree));
}
Also used : NodeState(org.apache.jackrabbit.oak.spi.state.NodeState) Test(org.junit.Test)

Example 59 with NodeState

use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.

the class NodeTypePredicateTest method emptyNodeTypeList.

@Test
public void emptyNodeTypeList() {
    NodeState node = createNodeOfType(NT_BASE);
    TypePredicate p = new TypePredicate(node, new String[] {});
    assertFalse(p.apply(node));
}
Also used : NodeState(org.apache.jackrabbit.oak.spi.state.NodeState) TypePredicate(org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate) Test(org.junit.Test)

Example 60 with NodeState

use of org.apache.jackrabbit.oak.spi.state.NodeState in project jackrabbit-oak by apache.

the class NodeTypePredicateTest method singleNodeTypeMiss.

@Test
public void singleNodeTypeMiss() {
    NodeState node = createNodeOfType(NT_BASE);
    TypePredicate p = new TypePredicate(node, new String[] { NT_FILE });
    assertFalse(p.apply(node));
}
Also used : NodeState(org.apache.jackrabbit.oak.spi.state.NodeState) TypePredicate(org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate) Test(org.junit.Test)

Aggregations

NodeState (org.apache.jackrabbit.oak.spi.state.NodeState)580 Test (org.junit.Test)375 NodeBuilder (org.apache.jackrabbit.oak.spi.state.NodeBuilder)254 EmptyNodeState (org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState)69 CommitFailedException (org.apache.jackrabbit.oak.api.CommitFailedException)46 PropertyState (org.apache.jackrabbit.oak.api.PropertyState)45 ChildNodeEntry (org.apache.jackrabbit.oak.spi.state.ChildNodeEntry)43 FilterImpl (org.apache.jackrabbit.oak.query.index.FilterImpl)39 EditorHook (org.apache.jackrabbit.oak.spi.commit.EditorHook)36 MemoryNodeStore (org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore)33 AbstractNodeState (org.apache.jackrabbit.oak.spi.state.AbstractNodeState)32 NodeStore (org.apache.jackrabbit.oak.spi.state.NodeStore)29 Nonnull (javax.annotation.Nonnull)28 Tree (org.apache.jackrabbit.oak.api.Tree)23 NodeStateTestUtils.getNodeState (org.apache.jackrabbit.oak.upgrade.util.NodeStateTestUtils.getNodeState)23 MemoryDocumentStore (org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore)19 DocumentNodeState (org.apache.jackrabbit.oak.plugins.document.DocumentNodeState)18 ArrayList (java.util.ArrayList)17 CommitInfo (org.apache.jackrabbit.oak.spi.commit.CommitInfo)16 AbstractSecurityTest (org.apache.jackrabbit.oak.AbstractSecurityTest)15