Search in sources :

Example 1 with ImmutableByteBag

use of org.eclipse.collections.api.bag.primitive.ImmutableByteBag in project eclipse-collections by eclipse.

the class ImmutableBagTestCase method collectByte.

@Override
@Test
public void collectByte() {
    super.collectByte();
    ImmutableByteBag result = this.newBag().collectByte(Byte::parseByte);
    Assert.assertEquals(this.numKeys(), result.sizeDistinct());
    for (int i = 1; i <= this.numKeys(); i++) {
        Assert.assertEquals(i, result.occurrencesOf((byte) i));
    }
}
Also used : ImmutableByteBag(org.eclipse.collections.api.bag.primitive.ImmutableByteBag) Test(org.junit.Test)

Aggregations

ImmutableByteBag (org.eclipse.collections.api.bag.primitive.ImmutableByteBag)1 Test (org.junit.Test)1