Changes

Jump to: navigation, search

Run Junit Tests For Non Default SQL Adapter

1,097 bytes added, 13:06, 26 February 2011
no edit summary
''For this manual, reference will be made to the PostgreSQL Adapter but it will work the same for other adapters''<br>
==== Prerequisite =Prerequisites ===
The following files must exist for the new SQL Adapter:
<br>'''src'''
<br><code>nexj.core.persistence.sql.[DbName]SQLAdapter.java</code> extending <code>nexj.core.persistence.sql.SQLAdapter</code>
<br><code>nexj.core.persistence.sql.[DbName]SQLSchemaManager.java</code> extending <code>nexj.core.persistence.sql.SQLSchemaManager</code>
<br>'''test'''
<br><code>nexj.core.persistence.sql.[DbName]SQLAdapterTest.java</code> extending <code>nexj.core.persistence.sql.SQLAdapterTest</code>
<br><code>nexj.core.persistence.sql.[DbName]SQLSchemaManagerTest.java</code> extending <code>nexj.core.persistence.sql.SQLSchemaManagerTest</code>
<br><code>nexj.core.util.JDBCInfo.java</code>
=== Configurations ===The following will configure the unit tests to run for [DbName]SQLAdapter and [DbName]SQLSchemaManager==== Environment /Connection Files ====These files are located in the ''test'' source folder in the package <code>nexj</code>#Default.config#*In the <code>DataSourceConnections</code> elemement#*Change all occurrences of <code>adapter="MySQL"</code> to <code>adapter="DbName"</code>#*Edit all occurrences of <code>port="3306"</code> to the port on which the new DbName is configured to accept connections<br>For the PostgreSQL Adapter, the following configuration is used<source lang="xml"><DataSourceConnections> <RelationalDatabaseConnection adapter="PostgreSQL" dataSource="DefaultRelationalDatabase" database="test" host="localhost" password="test" port="5432" unicode="true" user="test"/> <RelationalDatabaseConnection adapter="PostgreSQL" dataSource="ExternalRelationalDatabase" database="test" host="localhost" password="test" port="5432" unicode="true" user="test"/> ... </DataSourceConnections></source>==== SQL Scripts ======== Unit Test Files ====
1
edit

Navigation menu