Search in sources :

Example 1 with ImmutableBooleanListFactory

use of org.eclipse.collections.api.factory.list.primitive.ImmutableBooleanListFactory in project eclipse-collections by eclipse.

the class BooleanListsTest method immutables.

@Test
public void immutables() {
    ImmutableBooleanListFactory listFactory = BooleanLists.immutable;
    Assert.assertEquals(new BooleanArrayList(), listFactory.of());
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of());
    Assert.assertEquals(BooleanArrayList.newListWith(true), listFactory.of(true));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false), listFactory.of(true, false));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true), listFactory.of(true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false, true));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true, false), listFactory.of(true, false, true, false));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false, true, false));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true, false, true), listFactory.of(true, false, true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false, true, false, true));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true, false, true, false), listFactory.of(true, false, true, false, true, false));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false, true, false, true, false));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true, false, true, false, true), listFactory.of(true, false, true, false, true, false, true));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false, true, false, true, false, true));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true, false, true, false, true, true), listFactory.of(true, false, true, false, true, false, true, true));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false, true, false, true, false, true, true));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true, false, true, false, true, true, true), listFactory.of(true, false, true, false, true, false, true, true, true));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false, true, false, true, false, true, true, true));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true, false, true, false, true, true, true, false), listFactory.of(true, false, true, false, true, false, true, true, true, false));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.of(true, false, true, false, true, false, true, true, true, false));
    Assert.assertEquals(BooleanArrayList.newListWith(true, false, true), listFactory.ofAll(BooleanArrayList.newListWith(true, false, true)));
    Verify.assertInstanceOf(ImmutableBooleanList.class, listFactory.ofAll(BooleanArrayList.newListWith(true, false, true)));
}
Also used : BooleanArrayList(org.eclipse.collections.impl.list.mutable.primitive.BooleanArrayList) ImmutableBooleanListFactory(org.eclipse.collections.api.factory.list.primitive.ImmutableBooleanListFactory) Test(org.junit.Test)

Aggregations

ImmutableBooleanListFactory (org.eclipse.collections.api.factory.list.primitive.ImmutableBooleanListFactory)1 BooleanArrayList (org.eclipse.collections.impl.list.mutable.primitive.BooleanArrayList)1 Test (org.junit.Test)1