use of org.eclipse.collections.api.bag.primitive.ImmutableBooleanBag in project eclipse-collections by eclipse.
the class AbstractImmutableBooleanBagTestCase method appendString.
@Override
@Test
public void appendString() {
super.appendString();
StringBuilder appendable1 = new StringBuilder();
this.newWith(true, true, true).appendString(appendable1);
Assert.assertEquals("true, true, true", appendable1.toString());
StringBuilder appendable2 = new StringBuilder();
ImmutableBooleanBag bag1 = this.newWith(false, false, true);
bag1.appendString(appendable2);
Assert.assertTrue(appendable2.toString(), "false, false, true".equals(appendable2.toString()) || "true, false, false".equals(appendable2.toString()) || "false, true, false".equals(appendable2.toString()));
}
use of org.eclipse.collections.api.bag.primitive.ImmutableBooleanBag in project eclipse-collections by eclipse.
the class AbstractImmutableBooleanBagTestCase method anySatisfy.
@Override
@Test
public void anySatisfy() {
super.anySatisfy();
long[] count = { 0 };
ImmutableBooleanBag bag = this.newWith(false, true, false);
Assert.assertTrue(bag.anySatisfy(value -> {
count[0]++;
return value;
}));
Assert.assertEquals(2L, count[0]);
}
use of org.eclipse.collections.api.bag.primitive.ImmutableBooleanBag in project eclipse-collections by eclipse.
the class AbstractImmutableBooleanBagTestCase method noneSatisfy.
@Override
@Test
public void noneSatisfy() {
super.noneSatisfy();
ImmutableBooleanBag bag = this.newWith(false, true, false);
Assert.assertFalse(bag.noneSatisfy(value -> value));
}
Aggregations