Search in sources :

Example 16 with NodeBranchEntries

use of com.enonic.xp.node.NodeBranchEntries in project xp by enonic.

the class FindNodeBranchEntriesByIdCommandTest method node_with_capital_letter_in_id.

@Test
public void node_with_capital_letter_in_id() {
    final Node node1 = createNode(CreateNodeParams.create().name("node1").setNodeId(NodeId.from("Node1")).parent(NodePath.ROOT).build());
    final Node node1_1 = createNode(CreateNodeParams.create().name("node1_1").setNodeId(NodeId.from("Node1_1")).parent(node1.path()).build());
    final Node node1_1_1 = createNode(CreateNodeParams.create().name("node1_1_1").setNodeId(NodeId.from("Node1_1_1")).parent(node1_1.path()).build());
    final NodeBranchEntries result = FindNodeBranchEntriesByIdCommand.create().ids(NodeIds.from(node1.id(), node1_1.id(), node1_1_1.id())).searchService(this.searchService).storageService(this.storageService).indexServiceInternal(indexServiceInternal).build().execute();
    assertEquals(3, result.getSize());
}
Also used : NodeBranchEntries(com.enonic.xp.node.NodeBranchEntries) Node(com.enonic.xp.node.Node) Test(org.junit.jupiter.api.Test)

Aggregations

NodeBranchEntries (com.enonic.xp.node.NodeBranchEntries)16 Node (com.enonic.xp.node.Node)7 NodeBranchEntry (com.enonic.xp.node.NodeBranchEntry)7 InternalContext (com.enonic.xp.repo.impl.InternalContext)7 NodeId (com.enonic.xp.node.NodeId)5 Context (com.enonic.xp.context.Context)4 NodeIds (com.enonic.xp.node.NodeIds)4 FindNodesByParentResult (com.enonic.xp.node.FindNodesByParentResult)3 NodeComparison (com.enonic.xp.node.NodeComparison)3 NodeComparisons (com.enonic.xp.node.NodeComparisons)3 NodeNotFoundException (com.enonic.xp.node.NodeNotFoundException)3 NodePath (com.enonic.xp.node.NodePath)3 NodePaths (com.enonic.xp.node.NodePaths)3 NodeVersion (com.enonic.xp.node.NodeVersion)3 NodeVersionKey (com.enonic.xp.blob.NodeVersionKey)2 Branch (com.enonic.xp.branch.Branch)2 ContextAccessor (com.enonic.xp.context.ContextAccessor)2 NodeCommitEntry (com.enonic.xp.node.NodeCommitEntry)2 NodeCommitId (com.enonic.xp.node.NodeCommitId)2 NodeVersionId (com.enonic.xp.node.NodeVersionId)2