Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldScanExistingRelationshipsForARelationshiptype() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldScanExistingRelationshipsForARelationshiptype()
        {
            // given
            EntityUpdateCollectingVisitor visitor = new EntityUpdateCollectingVisitor(this);
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") org.neo4j.kernel.impl.api.index.StoreScan<Exception> storeScan = storeView.visitRelationships(new int[]{relTypeId}, id -> id == relPropertyKeyId, visitor);
            StoreScan <Exception> storeScan = _storeView.visitRelationships(new int[] { _relTypeId }, id => id == _relPropertyKeyId, visitor);

            // when
            storeScan.Run();

            // then
            assertEquals(asSet(Add(_aKnowsS.Id, _relPropertyKeyId, "long", new long[] { _relTypeId }), Add(_sKnowsA.Id, _relPropertyKeyId, "lengthy", new long[] { _relTypeId })), visitor.Updates);
        }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldScanExistingNodesForALabel() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldScanExistingNodesForALabel()
        {
            // given
            EntityUpdateCollectingVisitor visitor = new EntityUpdateCollectingVisitor(this);
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") org.neo4j.helpers.collection.Visitor<org.neo4j.kernel.api.labelscan.NodeLabelUpdate,Exception> labelVisitor = mock(org.neo4j.helpers.collection.Visitor.class);
            Visitor <NodeLabelUpdate, Exception> labelVisitor = mock(typeof(Visitor));
            StoreScan <Exception> storeScan = _storeView.visitNodes(new int[] { _labelId }, id => id == _propertyKeyId, visitor, labelVisitor, false);

            // when
            storeScan.Run();

            // then
            assertEquals(asSet(Add(_alistair.Id, _propertyKeyId, "Alistair", new long[] { _labelId }), Add(_stefan.Id, _propertyKeyId, "Stefan", new long[] { _labelId })), visitor.Updates);
        }
Пример #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldIgnoreDeletedRelationshipsDuringScan() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldIgnoreDeletedRelationshipsDuringScan()
        {
            // given
            DeleteAlistairAndStefanNodes();

            EntityUpdateCollectingVisitor visitor = new EntityUpdateCollectingVisitor(this);
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") org.neo4j.kernel.impl.api.index.StoreScan<Exception> storeScan = storeView.visitRelationships(new int[]{relTypeId}, id -> id == relPropertyKeyId, visitor);
            StoreScan <Exception> storeScan = _storeView.visitRelationships(new int[] { _relTypeId }, id => id == _relPropertyKeyId, visitor);

            // when
            storeScan.Run();

            // then
            assertEquals(emptySet(), visitor.Updates);
        }
Пример #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldIgnoreDeletedNodesDuringScan() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldIgnoreDeletedNodesDuringScan()
        {
            // given
            DeleteAlistairAndStefanNodes();

            EntityUpdateCollectingVisitor visitor = new EntityUpdateCollectingVisitor(this);
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") org.neo4j.helpers.collection.Visitor<org.neo4j.kernel.api.labelscan.NodeLabelUpdate,Exception> labelVisitor = mock(org.neo4j.helpers.collection.Visitor.class);
            Visitor <NodeLabelUpdate, Exception> labelVisitor = mock(typeof(Visitor));
            StoreScan <Exception> storeScan = _storeView.visitNodes(new int[] { _labelId }, id => id == _propertyKeyId, visitor, labelVisitor, false);

            // when
            storeScan.Run();

            // then
            assertEquals(emptySet(), visitor.Updates);
        }