Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldProcessRecordsParallelAndUpdateProgress() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldProcessRecordsParallelAndUpdateProgress()
        {
            // given
            ProgressMonitorFactory.MultiPartBuilder progressBuilder = mock(typeof(ProgressMonitorFactory.MultiPartBuilder));
            ProgressListener progressListener = mock(typeof(ProgressListener));

            when(progressBuilder.ProgressForPart(anyString(), anyLong())).thenReturn(progressListener);

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") org.neo4j.helpers.collection.BoundedIterable<int> store = mock(org.neo4j.helpers.collection.BoundedIterable.class);
            BoundedIterable <int> store = mock(typeof(BoundedIterable));

            when(store.GetEnumerator()).thenReturn(asList(42, 75, 192).GetEnumerator());

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") RecordProcessor<int> recordProcessor = mock(RecordProcessor.class);
            RecordProcessor <int> recordProcessor = mock(typeof(RecordProcessor));

            RecordScanner <int> scanner = new ParallelRecordScanner <int>("our test task", Statistics.NONE, 1, store, progressBuilder, recordProcessor, CacheAccess.EMPTY, QueueDistribution.ROUND_ROBIN);

            // when
            scanner.Run();

            // then
            VerifyProcessCloseAndDone(recordProcessor, store, progressListener);
        }
Esempio n. 2
0
 public SchemaStoreProcessorTask(string name, Statistics statistics, int threads, RecordStore <R> store, StoreAccess storeAccess, string builderPrefix, SchemaRecordCheck schemaRecordCheck, ProgressMonitorFactory.MultiPartBuilder builder, CacheAccess cacheAccess, StoreProcessor processor, QueueDistribution distribution) : base(name, statistics, threads, store, storeAccess, builderPrefix, builder, cacheAccess, processor, distribution)
 {
     this._schemaRecordCheck = schemaRecordCheck;
 }