Search in sources :

Example 6 with MutableLongIterator

use of org.eclipse.collections.api.iterator.MutableLongIterator in project mapdb by jankotek.

the class AbstractMutableLongCollectionTestCase method longIterator_throws_for_consecutive_remove.

@Test
public void longIterator_throws_for_consecutive_remove() {
    MutableLongCollection longIterable = this.classUnderTest();
    final MutableLongIterator iterator = longIterable.longIterator();
    Assert.assertTrue(iterator.hasNext());
    iterator.next();
    iterator.remove();
    Verify.assertThrows(IllegalStateException.class, new Runnable() {

        @Override
        public void run() {
            iterator.remove();
        }
    });
}
Also used : MutableLongCollection(org.eclipse.collections.api.collection.primitive.MutableLongCollection) MutableLongIterator(org.eclipse.collections.api.iterator.MutableLongIterator) Test(org.junit.Test)

Aggregations

MutableLongIterator (org.eclipse.collections.api.iterator.MutableLongIterator)6 Test (org.junit.Test)6 MutableLongCollection (org.eclipse.collections.api.collection.primitive.MutableLongCollection)3 MutableLongLongMap (org.eclipse.collections.api.map.primitive.MutableLongLongMap)1