createTestCase(true);
// ensure that all records are known
m_resultSet.last();
final XResultSet clone = createClone();
final XRowLocate cloneRowLocate = UnoRuntime.queryInterface( XRowLocate.class, clone );
positionRandom();
// .....................................................................................................
// move the clone to the same record as the RowSet, and delete this record
cloneRowLocate.moveToBookmark(m_rowLocate.getBookmark());
final int clonePosition = clone.getRow();
m_resultSetUpdate.deleteRow();
assure("clone doesn't know that its current row has been deleted via the RowSet", clone.rowDeleted());
assure("clone's position changed somehow during deletion", clonePosition == clone.getRow());
// .....................................................................................................
// move the row set away from the deleted record. This should still not touch the state of the clone
m_resultSet.previous();
assure("clone doesn't know (anymore) that its current row has been deleted via the RowSet", clone.rowDeleted());
assure("clone's position changed somehow during deletion and RowSet-movement", clonePosition == clone.getRow());
// .....................................................................................................
// move the clone away from the deleted record
clone.next();
assure("clone still assumes that its row is deleted - but we already moved it", !clone.rowDeleted());
// .....................................................................................................
// check whether deleting the extremes (first / last) work
m_resultSet.first();
cloneRowLocate.moveToBookmark(m_rowLocate.getBookmark());
m_resultSetUpdate.deleteRow();
clone.previous();
assure("deleting the first record left the clone in a strange state (after |previous|)", clone.isBeforeFirst());
clone.next();
assure("deleting the first record left the clone in a strange state (after |previous| + |next|)", clone.isFirst());
m_resultSet.last();
cloneRowLocate.moveToBookmark(m_rowLocate.getBookmark());
m_resultSetUpdate.deleteRow();
clone.next();
assure("deleting the last record left the clone in a strange state (after |next|)", clone.isAfterLast());
clone.previous();
assure("deleting the first record left the clone in a strange state (after |next| + |previous|)", clone.isLast());