Tag: cws_dev300_odbmacros3
User: fs
Date: 2008-07-23 13:07:34+0000
Modified:
dba/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
Log:
copying following changes from CWS dba30g to CWS odbmacros3:
2008/07/22 06:52:42 fs 1.8.22.1: copying following changes from CWS dba30h
to CWS dba30g:
2008/07/21 10:07:02 fs 1.8.26.1: #i91857# base on CRMBasedTestCase
File Changes:
Directory: /dba/dbaccess/qa/complex/dbaccess/
=============================================
File [changed]: SingleSelectQueryComposer.java
Url:
http://dba.openoffice.org/source/browse/dba/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java?r1=1.8&r2=1.8.14.1
Delta lines: +53 -75
---------------------
--- SingleSelectQueryComposer.java 2008-06-16 12:30:05+0000 1.8
+++ SingleSelectQueryComposer.java 2008-07-23 13:07:31+0000 1.8.14.1
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: SingleSelectQueryComposer.java,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.14.1 $
*
* This file is part of OpenOffice.org.
*
@@ -37,13 +37,13 @@
import com.sun.star.container.*;
import com.sun.star.lang.XMultiServiceFactory;
-import complexlib.ComplexTestCase;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.util.logging.Level;
+import java.util.logging.Logger;
-public class SingleSelectQueryComposer extends ComplexTestCase
+public class SingleSelectQueryComposer extends CRMBasedTestCase
{
- private CRMDatabase m_database;
private XSingleSelectQueryComposer m_composer;
private final String complexFilter = "( \"ID\" = 1 AND \"Postal\" = '4' )"
+
@@ -71,43 +71,21 @@
}
//
--------------------------------------------------------------------------------------------------------
- private final XMultiServiceFactory getORB()
- {
- return (XMultiServiceFactory)param.getMSF();
- }
-
- //
--------------------------------------------------------------------------------------------------------
private void createQueries() throws Exception
{
m_database.getDatabase().getDataSource().createQuery(
innerProductsQuery, "SELECT * FROM \"products\"" );
}
//
--------------------------------------------------------------------------------------------------------
- public void before()
- {
- createTestCase();
- }
-
- //
--------------------------------------------------------------------------------------------------------
- public void after()
- {
- if ( m_database != null )
- m_database.close();
- }
-
- //
--------------------------------------------------------------------------------------------------------
- private void createTestCase()
+ protected void createTestCase()
{
try
{
- m_database = new CRMDatabase( getORB() );
+ super.createTestCase();
createQueries();
- XMultiServiceFactory connectionFactory =
(XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, m_database.getConnection() );
- m_composer = (XSingleSelectQueryComposer)UnoRuntime.queryInterface(
- XSingleSelectQueryComposer.class,
connectionFactory.createInstance( "com.sun.star.sdb.SingleSelectQueryComposer"
) );
+ m_composer = createQueryComposer();
}
catch ( Exception e )
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]