use of com.hazelcast.internal.util.hashslot.HashSlotCursor16byteKey in project hazelcast by hazelcast.
the class HashSlotArray16byteKeyImplTest method testCursor_key2.
@Test
public void testCursor_key2() {
final long key1 = randomKey();
final long key2 = randomKey();
insert(key1, key2);
HashSlotCursor16byteKey cursor = hsa.cursor();
cursor.advance();
assertEquals(key2, cursor.key2());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor16byteKey in project hazelcast by hazelcast.
the class HashSlotArray16byteKeyImplTest method testCursor_key2_withoutAdvance.
@Test(expected = AssertionError.class)
@RequireAssertEnabled
public void testCursor_key2_withoutAdvance() {
HashSlotCursor16byteKey cursor = hsa.cursor();
cursor.key2();
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor16byteKey in project hazelcast by hazelcast.
the class HashSlotArray16byteKeyImplTest method testCursor_key1_withoutAdvance.
// Cursor tests
@Test(expected = AssertionError.class)
@RequireAssertEnabled
public void testCursor_key1_withoutAdvance() {
HashSlotCursor16byteKey cursor = hsa.cursor();
cursor.key1();
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor16byteKey in project hazelcast by hazelcast.
the class HashSlotArray16byteKeyImplTest method testCursor_advance.
@Test
public void testCursor_advance() {
insert(randomKey(), randomKey());
HashSlotCursor16byteKey cursor = hsa.cursor();
assertTrue(cursor.advance());
assertFalse(cursor.advance());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor16byteKey in project hazelcast by hazelcast.
the class HashSlotArray16byteKeyNoValueTest method testCursor_valueAddress.
@Test
public void testCursor_valueAddress() {
final long valueAddress = hsa.ensure(randomKey(), randomKey());
HashSlotCursor16byteKey cursor = hsa.cursor();
cursor.advance();
assertEquals(valueAddress, cursor.valueAddress());
}
Aggregations