use of com.hazelcast.internal.util.hashslot.HashSlotCursor8byteKey in project hazelcast by hazelcast.
the class HashSlotArray8byteKeyImplTest method testCursor_advance_afterAdvanceReturnsFalse.
@Test
@RequireAssertEnabled
public void testCursor_advance_afterAdvanceReturnsFalse() {
insert(random.nextLong());
HashSlotCursor8byteKey cursor = hsa.cursor();
cursor.advance();
cursor.advance();
try {
cursor.advance();
fail("cursor.advance() returned false, but subsequent call did not throw AssertionError");
} catch (AssertionError ignored) {
}
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor8byteKey in project hazelcast by hazelcast.
the class HashSlotArray8byteKeyImplTest method testCursor_advance_whenEmpty.
@Test
public void testCursor_advance_whenEmpty() {
HashSlotCursor8byteKey cursor = hsa.cursor();
assertFalse(cursor.advance());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor8byteKey in project hazelcast by hazelcast.
the class HashSlotArray8byteKeyImplTest method testCursor_key_withoutAdvance.
@Test(expected = AssertionError.class)
@RequireAssertEnabled
public void testCursor_key_withoutAdvance() {
HashSlotCursor8byteKey cursor = hsa.cursor();
cursor.key();
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor8byteKey in project hazelcast by hazelcast.
the class HashSlotArray8byteKeyImplTest method testCursor_advance.
@Test
public void testCursor_advance() {
insert(random.nextLong());
HashSlotCursor8byteKey cursor = hsa.cursor();
assertTrue(cursor.advance());
assertFalse(cursor.advance());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor8byteKey in project hazelcast by hazelcast.
the class HashSlotArray8byteKeyImplTest method testCursor_key.
@Test
public void testCursor_key() {
final long key = random.nextLong();
insert(key);
HashSlotCursor8byteKey cursor = hsa.cursor();
cursor.advance();
assertEquals(key, cursor.key());
}
Aggregations