use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_key2_whenDisposed.
@Test(expected = AssertionError.class)
public void testCursor_key2_whenDisposed() {
HashSlotCursor12byteKey cursor = hsa.cursor();
hsa.dispose();
cursor.key2();
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_valueAddress.
@Test
public void testCursor_valueAddress() {
final long valueAddress = insert(randomKey(), randomKey());
HashSlotCursor12byteKey cursor = hsa.cursor();
cursor.advance();
assertEquals(valueAddress, cursor.valueAddress());
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_valueAddress_whenDisposed.
@Test(expected = AssertionError.class)
public void testCursor_valueAddress_whenDisposed() {
HashSlotCursor12byteKey cursor = hsa.cursor();
hsa.dispose();
cursor.valueAddress();
}
use of com.hazelcast.internal.util.hashslot.HashSlotCursor12byteKey in project hazelcast by hazelcast.
the class HashSlotArray12byteKeyImplTest method testCursor_advance_afterAdvanceReturnsFalse.
@Test
@RequireAssertEnabled
public void testCursor_advance_afterAdvanceReturnsFalse() {
insert(randomKey(), randomKey());
HashSlotCursor12byteKey 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) {
}
}
Aggregations