use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_advance_whenEmpty.
@Test
public void testCursor_advance_whenEmpty() {
HashSlotCursor12byteKey cursor = hsa.cursor();
assertFalse(cursor.advance());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_advance.
@Test
public void testCursor_advance() {
insert(randomKey(), randomKey());
HashSlotCursor12byteKey cursor = hsa.cursor();
assertTrue(cursor.advance());
assertFalse(cursor.advance());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_advance_whenDisposed.
@Test(expected = AssertionError.class)
public void testCursor_advance_whenDisposed() {
HashSlotCursor12byteKey cursor = hsa.cursor();
hsa.dispose();
cursor.advance();
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_key1.
@Test
public void testCursor_key1() {
final long key1 = randomKey();
final int key2 = randomKey();
insert(key1, key2);
HashSlotCursor12byteKey cursor = hsa.cursor();
cursor.advance();
assertEquals(key1, cursor.key1());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_key2_withoutAdvance.
@Test(expected = AssertionError.class)
@RequireAssertEnabled
public void testCursor_key2_withoutAdvance() {
HashSlotCursor12byteKey cursor = hsa.cursor();
cursor.key2();
}
Aggregations