Search in sources :

Example 1 with StubRelationshipCursor

use of org.neo4j.internal.kernel.api.helpers.StubRelationshipCursor in project neo4j by neo4j.

the class OperationsTest method returnRelationships.

public static void returnRelationships(KernelTransactionImplementation ktx, final TestRelationshipChain relIds) {
    StubRead read = new StubRead();
    when(ktx.dataRead()).thenReturn(read);
    StubCursorFactory cursorFactory = new StubCursorFactory(true);
    cursorFactory.withRelationshipTraversalCursors(new StubRelationshipCursor(relIds));
    when(ktx.lockTracer()).thenReturn(NONE);
    when(ktx.cursors()).thenReturn(cursorFactory);
    when(ktx.ambientNodeCursor()).thenAnswer(args -> new StubNodeCursor(false).withNode(42L));
}
Also used : StubNodeCursor(org.neo4j.internal.kernel.api.helpers.StubNodeCursor) StubRead(org.neo4j.internal.kernel.api.helpers.StubRead) StubCursorFactory(org.neo4j.internal.kernel.api.helpers.StubCursorFactory) StubRelationshipCursor(org.neo4j.internal.kernel.api.helpers.StubRelationshipCursor)

Aggregations

StubCursorFactory (org.neo4j.internal.kernel.api.helpers.StubCursorFactory)1 StubNodeCursor (org.neo4j.internal.kernel.api.helpers.StubNodeCursor)1 StubRead (org.neo4j.internal.kernel.api.helpers.StubRead)1 StubRelationshipCursor (org.neo4j.internal.kernel.api.helpers.StubRelationshipCursor)1