diff options
author | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-02-23 11:36:11 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-02-23 11:36:11 +0100 |
commit | 9a2ce2d264be1ee44ac8406b39e821f7752d6947 (patch) | |
tree | 809bce5515a53e35b273f5abe4409afecaceb05c /dbaccess/qa | |
parent | 0ce16968e3dc0893462944b828195fbf14acbe9f (diff) |
dba34c: #i117043# fix modified state of rowset
Diffstat (limited to 'dbaccess/qa')
-rw-r--r-- | dbaccess/qa/complex/dbaccess/Query.java | 16 | ||||
-rw-r--r-- | dbaccess/qa/complex/dbaccess/RowSet.java | 4 |
2 files changed, 12 insertions, 8 deletions
diff --git a/dbaccess/qa/complex/dbaccess/Query.java b/dbaccess/qa/complex/dbaccess/Query.java index 2ea435bcd10c..40af4387bb5c 100644 --- a/dbaccess/qa/complex/dbaccess/Query.java +++ b/dbaccess/qa/complex/dbaccess/Query.java @@ -40,7 +40,8 @@ import org.junit.Test; import static org.junit.Assert.*; // ------------------------------------------ -public class Query extends TestCase { +public class Query extends TestCase +{ connectivity.tools.HsqlDatabase m_database; @@ -49,17 +50,17 @@ public class Query extends TestCase { { try { - if ( m_database == null ) + if (m_database == null) { - final CRMDatabase database = new CRMDatabase( getMSF(), false ); + final CRMDatabase database = new CRMDatabase(getMSF(), false); m_database = database.getDatabase(); } } - catch( Exception e ) + catch (Exception e) { - System.out.println( "could not create the test case, error message:\n" + e.getMessage() ); - e.printStackTrace( System.err ); - fail( "failed to created the test case"); + System.out.println("could not create the test case, error message:\n" + e.getMessage()); + e.printStackTrace(System.err); + fail("failed to created the test case"); } } @@ -68,7 +69,6 @@ public class Query extends TestCase { // { // return (XMultiServiceFactory)param.getMSF(); // } - // -------------------------------------------------------------------------------------------------------- @Test public void testQueryColumns() diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java b/dbaccess/qa/complex/dbaccess/RowSet.java index 7716f7f30512..921aff2046ef 100644 --- a/dbaccess/qa/complex/dbaccess/RowSet.java +++ b/dbaccess/qa/complex/dbaccess/RowSet.java @@ -435,6 +435,10 @@ public class RowSet extends TestCase testCursorMove(m_resultSet, cResSet.getMethod(NEXT, (Class[]) null), pRow, moves, null); moves[RowSetEventListener.IS_MODIFIED] = false; + updRow.updateString(2, m_row.getString(2)); + testCursorMove(m_resultSet, cResSet.getMethod(NEXT, (Class[]) null), pRow, moves, null); + + moves[RowSetEventListener.IS_MODIFIED] = false; final Class cupd = Class.forName("com.sun.star.sdbc.XResultSetUpdate"); final XResultSetUpdate upd = UnoRuntime.queryInterface( XResultSetUpdate.class, m_resultSet ); testCursorMove(upd, cupd.getMethod("moveToInsertRow", (Class[]) null), pRow, moves, null); |