Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void retrieveUsedRelationship()
        public virtual void RetrieveUsedRelationship()
        {
            RelationshipStore relationshipStore = _neoStores.RelationshipStore;

            CreateRelationshipRecord(RELATIONSHIP_ID, 1, relationshipStore, true);

            using (RecordRelationshipScanCursor cursor = CreateRelationshipCursor())
            {
                cursor.Single(RELATIONSHIP_ID);
                assertTrue(cursor.Next());
                assertEquals(RELATIONSHIP_ID, cursor.EntityReference());
            }
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void retrieveUnusedRelationship()
        public virtual void RetrieveUnusedRelationship()
        {
            RelationshipStore relationshipStore = _neoStores.RelationshipStore;

            relationshipStore.HighId = 10;
            CreateRelationshipRecord(RELATIONSHIP_ID, 1, relationshipStore, false);

            using (RecordRelationshipScanCursor cursor = CreateRelationshipCursor())
            {
                cursor.Single(RELATIONSHIP_ID);
                assertFalse(cursor.Next());
            }
        }
Esempio n. 3
0
 private void AssertSeesRelationships(ISet <long> expected, int type)
 {
     using (RecordRelationshipScanCursor cursor = CreateRelationshipCursor())
     {
         cursor.Scan(type);
         while (cursor.Next())
         {
             // then
             assertTrue(cursor.ToString(), expected.remove(cursor.EntityReference()));
         }
     }
     assertTrue(expected.Count == 0);
 }
Esempio n. 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void relationshipScanCursorShouldClosePageCursor()
        internal virtual void RelationshipScanCursorShouldClosePageCursor()
        {
            RelationshipStore store      = mock(typeof(RelationshipStore));
            PageCursor        pageCursor = mock(typeof(PageCursor));

            when(store.OpenPageCursorForReading(anyLong())).thenReturn(pageCursor);

            using (RecordRelationshipScanCursor cursor = new RecordRelationshipScanCursor(store))
            {
                cursor.Single(0);
            }
            verify(pageCursor).close();
        }