Search in sources :

Example 11 with MutableBooleanIterator

use of org.eclipse.collections.api.iterator.MutableBooleanIterator in project eclipse-collections by eclipse.

the class UnmodifiableBooleanSetTest method booleanIterator_with_remove.

@Override
@Test
public void booleanIterator_with_remove() {
    MutableBooleanIterator booleanIterator = this.classUnderTest().booleanIterator();
    Assert.assertTrue(booleanIterator.hasNext());
    booleanIterator.next();
    Verify.assertThrows(UnsupportedOperationException.class, booleanIterator::remove);
}
Also used : MutableBooleanIterator(org.eclipse.collections.api.iterator.MutableBooleanIterator) Test(org.junit.Test)

Example 12 with MutableBooleanIterator

use of org.eclipse.collections.api.iterator.MutableBooleanIterator in project eclipse-collections by eclipse.

the class UnmodifiableBooleanSetTest method iterator_throws_on_invocation_of_remove_before_next.

@Override
@Test
public void iterator_throws_on_invocation_of_remove_before_next() {
    MutableBooleanIterator booleanIterator = this.classUnderTest().booleanIterator();
    Assert.assertTrue(booleanIterator.hasNext());
    Verify.assertThrows(UnsupportedOperationException.class, booleanIterator::remove);
}
Also used : MutableBooleanIterator(org.eclipse.collections.api.iterator.MutableBooleanIterator) Test(org.junit.Test)

Example 13 with MutableBooleanIterator

use of org.eclipse.collections.api.iterator.MutableBooleanIterator in project eclipse-collections by eclipse.

the class UnmodifiableBooleanStackTest method iterator_throws_on_invocation_of_remove_before_next.

@Test
public void iterator_throws_on_invocation_of_remove_before_next() {
    MutableBooleanIterator booleanIterator = (MutableBooleanIterator) this.classUnderTest().booleanIterator();
    Assert.assertTrue(booleanIterator.hasNext());
    Verify.assertThrows(UnsupportedOperationException.class, booleanIterator::remove);
}
Also used : MutableBooleanIterator(org.eclipse.collections.api.iterator.MutableBooleanIterator) Test(org.junit.Test)

Example 14 with MutableBooleanIterator

use of org.eclipse.collections.api.iterator.MutableBooleanIterator in project eclipse-collections by eclipse.

the class UnmodifiableBooleanListTest method iterator_throws_on_invocation_of_remove_before_next.

@Override
@Test
public void iterator_throws_on_invocation_of_remove_before_next() {
    MutableBooleanIterator booleanIterator = this.classUnderTest().booleanIterator();
    Assert.assertTrue(booleanIterator.hasNext());
    Verify.assertThrows(UnsupportedOperationException.class, booleanIterator::remove);
}
Also used : MutableBooleanIterator(org.eclipse.collections.api.iterator.MutableBooleanIterator) Test(org.junit.Test)

Example 15 with MutableBooleanIterator

use of org.eclipse.collections.api.iterator.MutableBooleanIterator in project eclipse-collections by eclipse.

the class AbstractMutableObjectBooleanMapTestCase method iterator_throws_on_invocation_of_remove_before_next.

@Test
public void iterator_throws_on_invocation_of_remove_before_next() {
    MutableObjectBooleanMap<String> map = this.classUnderTest();
    MutableBooleanIterator booleanIterator = map.booleanIterator();
    Assert.assertTrue(booleanIterator.hasNext());
    Verify.assertThrows(IllegalStateException.class, booleanIterator::remove);
}
Also used : MutableBooleanIterator(org.eclipse.collections.api.iterator.MutableBooleanIterator) Test(org.junit.Test)

Aggregations

MutableBooleanIterator (org.eclipse.collections.api.iterator.MutableBooleanIterator)18 Test (org.junit.Test)18 MutableBooleanCollection (org.eclipse.collections.api.collection.primitive.MutableBooleanCollection)4 BooleanIterator (org.eclipse.collections.api.iterator.BooleanIterator)1 BooleanArrayList (org.eclipse.collections.impl.list.mutable.primitive.BooleanArrayList)1