示例#1
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));
        }
示例#2
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));
        }
 private void InitializeInstanceFields()
 {
     _innerGroupCursor        = new StubGroupCursor(Group(_store, typeA, _outA, _inA, _loopA), Group(_store, typeB, _outB, _inB, _loopB), Group(_store, typeC, _outC, _inC, _loopC));
     _innerRelationshipCursor = new StubRelationshipCursor(_store);
 }