Пример #1
0
 private IndexSample SampleIndex(IndexSampler sampler)
 {
     try
     {
         return(sampler.SampleIndex());
     }
     catch (IndexNotFoundKernelException e)
     {
         throw new Exception(e);
     }
 }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void samplingOverPartitions() throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void SamplingOverPartitions()
        {
            PartitionedIndexReader indexReader = CreatePartitionedReaderFromReaders();

            when(_indexReader1.createSampler()).thenReturn(new SimpleSampler(this, 1));
            when(_indexReader2.createSampler()).thenReturn(new SimpleSampler(this, 2));
            when(_indexReader3.createSampler()).thenReturn(new SimpleSampler(this, 3));

            IndexSampler sampler = indexReader.CreateSampler();

            assertEquals(new IndexSample(6, 6, 6), sampler.SampleIndex());
        }