//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void traverseViaGroups(RelationshipTestSupport.StartNode start, boolean detached) throws org.neo4j.internal.kernel.api.exceptions.KernelException
        private void TraverseViaGroups(RelationshipTestSupport.StartNode start, bool detached)
        {
            // given
            IDictionary <string, int> expectedCounts = start.ExpectedCounts();

            using (NodeCursor node = cursors.allocateNodeCursor(), RelationshipGroupCursor group = cursors.allocateRelationshipGroupCursor(), RelationshipTraversalCursor relationship = cursors.allocateRelationshipTraversalCursor())
            {
                // when
                read.singleNode(start.Id, node);
                assertTrue("access node", node.Next());
                if (detached)
                {
                    read.relationshipGroups(start.Id, node.RelationshipGroupReference(), group);
                }
                else
                {
                    node.Relationships(group);
                }

                while (group.next())
                {
                    // outgoing
                    if (detached)
                    {
                        read.relationships(start.Id, group.OutgoingReference(), relationship);
                    }
                    else
                    {
                        group.Outgoing(relationship);
                    }
                    // then
                    assertCount(tx, relationship, expectedCounts, group.Type(), OUTGOING);

                    // incoming
                    if (detached)
                    {
                        read.relationships(start.Id, group.IncomingReference(), relationship);
                    }
                    else
                    {
                        group.Incoming(relationship);
                    }
                    // then
                    assertCount(tx, relationship, expectedCounts, group.Type(), INCOMING);

                    // loops
                    if (detached)
                    {
                        read.relationships(start.Id, group.LoopsReference(), relationship);
                    }
                    else
                    {
                        group.Loops(relationship);
                    }
                    // then
                    assertCount(tx, relationship, expectedCounts, group.Type(), BOTH);
                }
            }
        }
        public override void CreateTestGraph(GraphDatabaseService graphDb)
        {
            RelationshipTestSupport.SomeGraph(graphDb);
            BareStartAndEnd(graphDb);

            _sparse = RelationshipTestSupport.Sparse(graphDb);
            _dense  = RelationshipTestSupport.Dense(graphDb);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void traverseWithoutGroups(RelationshipTestSupport.StartNode start, boolean detached) throws org.neo4j.internal.kernel.api.exceptions.KernelException
        private void TraverseWithoutGroups(RelationshipTestSupport.StartNode start, bool detached)
        {
            // given
            using (NodeCursor node = cursors.allocateNodeCursor(), RelationshipTraversalCursor relationship = cursors.allocateRelationshipTraversalCursor())
            {
                // when
                read.singleNode(start.Id, node);
                assertTrue("access node", node.Next());

                if (detached)
                {
                    read.relationships(start.Id, node.AllRelationshipsReference(), relationship);
                }
                else
                {
                    node.AllRelationships(relationship);
                }

                IDictionary <string, int> counts = count(tx, relationship);

                // then
                assertCounts(start.ExpectedCounts(), counts);
            }
        }