Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldFillGapInMiddle()
        internal virtual void ShouldFillGapInMiddle()
        {
            // given
            int[] ranges = Array(EMPTY_RANGE, _nonEmptyRange, EMPTY_RANGE);
            GapFreeAllEntriesLabelScanReader reader = NewGapFreeAllEntriesLabelScanReader(ranges);

            // when
            IEnumerator <NodeLabelRange> iterator = reader.GetEnumerator();

            // then
            AssertRanges(iterator, ranges);
        }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldFillRandomGaps()
        internal virtual void ShouldFillRandomGaps()
        {
            // given
            int numberOfRanges = _random.intBetween(50, 100);

            int[] ranges = new int[numberOfRanges];
            for (int rangeId = 0; rangeId < numberOfRanges; rangeId++)
            {
                ranges[rangeId] = _random.Next(1 << RANGE_SIZE);
            }
            GapFreeAllEntriesLabelScanReader reader = NewGapFreeAllEntriesLabelScanReader(ranges);

            // when
            IEnumerator <NodeLabelRange> iterator = reader.GetEnumerator();

            // then
            AssertRanges(iterator, ranges);
        }