use of org.eclipse.collections.api.iterator.LongIterator in project mapdb by jankotek.
the class AbstractLazyLongIterableTestCase method longIterator.
@Test
public void longIterator() {
long sum = 0L;
for (LongIterator iterator = this.classUnderTest().longIterator(); iterator.hasNext(); ) {
sum += iterator.next();
}
Assert.assertEquals(6L, sum);
}
use of org.eclipse.collections.api.iterator.LongIterator in project mapdb by jankotek.
the class AbstractLongIterableTestCase method longIterator_throws_non_empty_collection.
@Test(expected = NoSuchElementException.class)
public void longIterator_throws_non_empty_collection() {
LongIterable iterable = this.newWith(1L, 2L, 3L);
LongIterator iterator = iterable.longIterator();
while (iterator.hasNext()) {
iterator.next();
}
iterator.next();
}
use of org.eclipse.collections.api.iterator.LongIterator in project mapdb by jankotek.
the class AbstractLongIterableTestCase method longIterator_throws.
@Test(expected = NoSuchElementException.class)
public void longIterator_throws() {
LongIterator iterator = this.classUnderTest().longIterator();
while (iterator.hasNext()) {
iterator.next();
}
iterator.next();
}
use of org.eclipse.collections.api.iterator.LongIterator in project mapdb by jankotek.
the class AbstractLongIterableTestCase method longIterator_throws.
@Test(expected = NoSuchElementException.class)
public void longIterator_throws() {
LongIterator iterator = this.classUnderTest().longIterator();
while (iterator.hasNext()) {
iterator.next();
}
iterator.next();
}
use of org.eclipse.collections.api.iterator.LongIterator in project mapdb by jankotek.
the class AbstractLazyLongIterableTestCase method longIterator.
@Test
public void longIterator() {
long sum = 0L;
for (LongIterator iterator = this.classUnderTest().longIterator(); iterator.hasNext(); ) {
sum += iterator.next();
}
Assert.assertEquals(6L, sum);
}
Aggregations