use of com.hazelcast.test.RequireAssertEnabled in project hazelcast by hazelcast.
the class HashSlotArray8byteKeyImplTest method testCursor_advance_whenDisposed.
@Test(expected = AssertionError.class)
@RequireAssertEnabled
public void testCursor_advance_whenDisposed() {
HashSlotCursor8byteKey cursor = hsa.cursor();
hsa.dispose();
cursor.advance();
}
use of com.hazelcast.test.RequireAssertEnabled 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.test.RequireAssertEnabled 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.test.RequireAssertEnabled 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