示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void processAllRelationshipProperties() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ProcessAllRelationshipProperties()
        {
            CreateAlistairAndStefanNodes();
            CopyUpdateVisitor     propertyUpdateVisitor = new CopyUpdateVisitor();
            RelationshipStoreScan relationshipStoreScan = new RelationshipStoreScan(new RecordStorageReader(_neoStores), _locks, propertyUpdateVisitor, new int[] { _relTypeId }, id => true);

            using (StorageRelationshipScanCursor relationshipScanCursor = _reader.allocateRelationshipScanCursor())
            {
                relationshipScanCursor.Single(1);
                relationshipScanCursor.Next();

                relationshipStoreScan.process(relationshipScanCursor);
            }

            EntityUpdates propertyUpdates = propertyUpdateVisitor.PropertyUpdates;

            assertNotNull("Visitor should contain container with updates.", propertyUpdates);

            RelationTypeSchemaDescriptor         index1  = SchemaDescriptorFactory.forRelType(0, 2);
            RelationTypeSchemaDescriptor         index2  = SchemaDescriptorFactory.forRelType(0, 3);
            RelationTypeSchemaDescriptor         index3  = SchemaDescriptorFactory.forRelType(0, 2, 3);
            RelationTypeSchemaDescriptor         index4  = SchemaDescriptorFactory.forRelType(1, 3);
            IList <RelationTypeSchemaDescriptor> indexes = Arrays.asList(index1, index2, index3, index4);

//JAVA TO C# CONVERTER TODO TASK: Method reference arbitrary object instance method syntax is not converted by Java to C# Converter:
            assertThat(Iterables.map(IndexEntryUpdate::indexKey, propertyUpdates.ForIndexKeys(indexes)), containsInAnyOrder(index1, index2, index3));
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void processAllNodeProperties() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ProcessAllNodeProperties()
        {
            CopyUpdateVisitor      propertyUpdateVisitor  = new CopyUpdateVisitor();
            StoreViewNodeStoreScan storeViewNodeStoreScan = new StoreViewNodeStoreScan(new RecordStorageReader(_neoStores), _locks, null, propertyUpdateVisitor, new int[] { _labelId }, id => true);

            using (StorageNodeCursor nodeCursor = _reader.allocateNodeCursor())
            {
                nodeCursor.Single(1);
                nodeCursor.Next();

                storeViewNodeStoreScan.process(nodeCursor);
            }

            EntityUpdates propertyUpdates = propertyUpdateVisitor.PropertyUpdates;

            assertNotNull("Visitor should contain container with updates.", propertyUpdates);

            LabelSchemaDescriptor         index1  = SchemaDescriptorFactory.forLabel(0, 0);
            LabelSchemaDescriptor         index2  = SchemaDescriptorFactory.forLabel(0, 1);
            LabelSchemaDescriptor         index3  = SchemaDescriptorFactory.forLabel(0, 0, 1);
            LabelSchemaDescriptor         index4  = SchemaDescriptorFactory.forLabel(1, 1);
            IList <LabelSchemaDescriptor> indexes = Arrays.asList(index1, index2, index3, index4);

//JAVA TO C# CONVERTER TODO TASK: Method reference arbitrary object instance method syntax is not converted by Java to C# Converter:
            assertThat(Iterables.map(IndexEntryUpdate::indexKey, propertyUpdates.ForIndexKeys(indexes)), containsInAnyOrder(index1, index2, index3));
        }