Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCountOutgoingDenseWithType()
        public virtual void ShouldCountOutgoingDenseWithType()
        {
            // Given
            StubGroupCursor   groupCursor = new StubGroupCursor(Group(1).withOutCount(1).withInCount(1).withLoopCount(5), Group(2).withOutCount(1).withInCount(1).withLoopCount(3));
            StubCursorFactory cursors     = (new StubCursorFactory()).WithGroupCursors(groupCursor, groupCursor);

            // Then
            assertThat(countOutgoing(new StubNodeCursor(true), cursors, 1), equalTo(6));
            assertThat(countOutgoing(new StubNodeCursor(true), cursors, 2), equalTo(4));
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCountIncomingDense()
        public virtual void ShouldCountIncomingDense()
        {
            // Given
            StubGroupCursor   groupCursor = new StubGroupCursor(Group().withOutCount(1).withInCount(1).withLoopCount(5), Group().withOutCount(1).withInCount(1).withLoopCount(3), Group().withOutCount(2).withInCount(1).withLoopCount(2), Group().withOutCount(3).withInCount(1).withLoopCount(1), Group().withOutCount(5).withInCount(1).withLoopCount(1));
            StubCursorFactory cursors     = (new StubCursorFactory()).WithGroupCursors(groupCursor);

            // When
            int count = countIncoming(new StubNodeCursor(true), cursors);

            // Then
            assertThat(count, equalTo(17));
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCountAllWithTypeSparse()
        public virtual void ShouldCountAllWithTypeSparse()
        {
            // Given
            StubRelationshipCursor relationshipCursor = new StubRelationshipCursor(new TestRelationshipChain(11)
                                                                                   .outgoing(55, 0, 1).incoming(56, 0, 1).outgoing(57, 0, 1).loop(58, 2));
            StubCursorFactory cursors = (new StubCursorFactory(true)).WithRelationshipTraversalCursors(relationshipCursor);

            // Then
            StubNodeCursor nodeCursor = (new StubNodeCursor(false)).WithNode(11);

            nodeCursor.Next();
            assertThat(countAll(nodeCursor, cursors, 1), equalTo(3));
            assertThat(countAll(nodeCursor, cursors, 2), equalTo(1));
        }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCountOutgoingSparse()
        public virtual void ShouldCountOutgoingSparse()
        {
            // Given
            StubRelationshipCursor relationshipCursor = new StubRelationshipCursor(new TestRelationshipChain(11)
                                                                                   .outgoing(55, 0, 1).incoming(56, 0, 1).outgoing(57, 0, 1).loop(58, 0));
            StubCursorFactory cursors = (new StubCursorFactory()).WithRelationshipTraversalCursors(relationshipCursor);

            // When
            StubNodeCursor nodeCursor = (new StubNodeCursor(false)).WithNode(11);

            nodeCursor.Next();
            int count = countOutgoing(nodeCursor, cursors);

            // Then
            assertThat(count, equalTo(3));
        }