Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldScanRelationships()
        public virtual void ShouldScanRelationships()
        {
            // given
            IList <long> ids = new List <long>();

            using (RelationshipScanCursor relationships = cursors.allocateRelationshipScanCursor())
            {
                // when
                read.allRelationshipsScan(relationships);
                while (relationships.Next())
                {
                    ids.Add(relationships.RelationshipReference());
                }
            }

            assertEquals(_relationshipIds, ids);
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAccessRelationshipByReference()
        public virtual void ShouldAccessRelationshipByReference()
        {
            // given
            using (RelationshipScanCursor relationships = cursors.allocateRelationshipScanCursor())
            {
                foreach (long id in _relationshipIds)
                {
                    // when
                    read.singleRelationship(id, relationships);

                    // then
                    assertTrue("should access defined relationship", relationships.Next());
                    assertEquals("should access the correct relationship", id, relationships.RelationshipReference());
                    assertFalse("should only access a single relationship", relationships.Next());
                }
            }
        }