use of com.hazelcast.internal.util.hashslot.HashSlotCursor16byteKey in project hazelcast by hazelcast.
the class HashSlotArray16byteKeyNoValueTest method testCursor_key2.
@Test
public void testCursor_key2() {
final long key1 = randomKey();
final long key2 = randomKey();
hsa.ensure(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 HashSlotArray16byteKeyNoValueTest method testCursor_advance.
@Test
public void testCursor_advance() {
hsa.ensure(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 HashSlotArray16byteKeyImplTest method testCursor_advance_whenEmpty.
@Test
public void testCursor_advance_whenEmpty() {
HashSlotCursor16byteKey cursor = hsa.cursor();
assertFalse(cursor.advance());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor16byteKey in project hazelcast by hazelcast.
the class HashSlotArray16byteKeyImplTest method testCursor_key1_whenDisposed.
@Test(expected = AssertionError.class)
public void testCursor_key1_whenDisposed() {
HashSlotCursor16byteKey cursor = hsa.cursor();
hsa.dispose();
cursor.key1();
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor16byteKey in project hazelcast by hazelcast.
the class HashSlotArray16byteKeyImplTest method testCursor_valueAddress_whenDisposed.
@Test(expected = AssertionError.class)
public void testCursor_valueAddress_whenDisposed() {
HashSlotCursor16byteKey cursor = hsa.cursor();
hsa.dispose();
cursor.valueAddress();
}
Aggregations