private void RegularTraversalWithTxState(long reference) { // given StorageRelationshipTraversalCursor storeCursor = storeCursor(100, 102, 104); DefaultRelationshipTraversalCursor cursor = new DefaultRelationshipTraversalCursor(_pool, storeCursor); Read read = TxState(3, 4); // when cursor.Init(_node, reference, read); // then AssertRelationships(cursor, 3, 4, 100, 102, 104); }
// Sparse traversal but with tx-state filtering //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void sparseTraversalWithTxStateFiltering() public virtual void SparseTraversalWithTxStateFiltering() { // given StorageRelationshipTraversalCursor storeCursor = storeCursor(Rel(100, _node, 50, _type), Rel(102, _node, 51, _type), Rel(104, _node, 52, _type)); DefaultRelationshipTraversalCursor cursor = new DefaultRelationshipTraversalCursor(_pool, storeCursor); Read read = TxState(Rel(3, _node, 50, _type), Rel(4, 50, _node, _type), Rel(5, _node, 50, _type2), Rel(6, _node, _node, _type), Rel(7, _node, 52, _type)); // when cursor.Init(_node, RelationshipReferenceEncoding.encodeForTxStateFiltering(_relationship), read); // then AssertRelationships(cursor, 100, 3, 7, 102, 104); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void emptyStoreLoopsOfType() public virtual void EmptyStoreLoopsOfType() { // given StorageRelationshipTraversalCursor storeCursor = EmptyStoreCursor(); DefaultRelationshipTraversalCursor cursor = new DefaultRelationshipTraversalCursor(_pool, storeCursor); Read read = TxState(Rel(3, _node, 50, _type), Rel(2, _node, _node, _type), Rel(5, 50, _node, _type2), Rel(6, _node, _node, _type), Rel(7, 56, _node, _type), Rel(8, _node, 52, _type)); // when cursor.Init(_node, RelationshipReferenceEncoding.encodeNoLoopRels(_type), read); // then AssertRelationships(cursor, 2, 6); }