Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void rangeSeekByPrefixOverPartitions() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void RangeSeekByPrefixOverPartitions()
        {
            PartitionedIndexReader indexReader = CreatePartitionedReaderFromReaders();

            IndexQuery.StringPrefixPredicate query = IndexQuery.stringPrefix(1, stringValue("prefix"));
            when(_indexReader1.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 1));
            when(_indexReader2.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 2));
            when(_indexReader3.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 3));

            LongSet results = PrimitiveLongCollections.asSet(indexReader.Query(query));

            VerifyResult(results);
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void scanOverPartitions() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ScanOverPartitions()
        {
            PartitionedIndexReader indexReader = CreatePartitionedReaderFromReaders();

            IndexQuery.ExistsPredicate query = IndexQuery.exists(1);
            when(_indexReader1.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 1));
            when(_indexReader2.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 2));
            when(_indexReader3.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 3));

            LongSet results = PrimitiveLongCollections.asSet(indexReader.Query(query));

            VerifyResult(results);
        }
Beispiel #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void rangeSeekByStringOverPartitions() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void RangeSeekByStringOverPartitions()
        {
            PartitionedIndexReader indexReader = CreatePartitionedReaderFromReaders();

//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: org.neo4j.internal.kernel.api.IndexQuery.RangePredicate<?> query = org.neo4j.internal.kernel.api.IndexQuery.range(1, "a", false, "b", true);
            IndexQuery.RangePredicate <object> query = IndexQuery.range(1, "a", false, "b", true);
            when(_indexReader1.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 1));
            when(_indexReader2.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 2));
            when(_indexReader3.query(query)).thenReturn(PrimitiveLongResourceCollections.iterator(null, 3));

            LongSet results = PrimitiveLongCollections.asSet(indexReader.Query(query));

            VerifyResult(results);
        }