assertCurrentValue(cursor, position, tuple);
}
public static void assertCurrentValue(BlockCursor cursor, int position, Tuple tuple)
{
TupleInfo tupleInfo = tuple.getTupleInfo();
assertEquals(cursor.getTupleInfo(), tupleInfo);
assertEquals(cursor.getTuple(), tuple);
assertEquals(cursor.getPosition(), position);
assertTrue(cursor.currentTupleEquals(tuple));
for (int index = 0; index < tupleInfo.getFieldCount(); index++) {
assertEquals(cursor.isNull(index), tuple.isNull(index));
switch (tupleInfo.getTypes().get(index)) {
case BOOLEAN:
assertEquals(cursor.getBoolean(index), tuple.getBoolean(index));
try {
cursor.getSlice(index);
fail("Expected IllegalStateException or UnsupportedOperationException");