Difference between revisions of "Run Junit Tests For Non Default SQL Adapter"

From CDOT Wiki
Jump to: navigation, search
(Created page with '== Debugging a Non-Default SQL Adapter == ===Summary=== By default, NexJ Express Unit tests are configured to test the MySQL Adapter. The instructions that follow outline instruc…')
 
Line 1: Line 1:
 
== Debugging a Non-Default SQL Adapter ==
 
== Debugging a Non-Default SQL Adapter ==
===Summary===
 
By default, NexJ Express Unit tests are configured to test the MySQL Adapter.
 
The instructions that follow outline instructions for configuring Unit tests to be run for other SQL Adapters.
 
''For this manual, reference will be made to the PostgreSQL Adapter but it will work the same for other adapters''
 
  
====Prerequisite====
+
=== Summary ===
The following source must exist for the new SQL Adapter:
 
<code>nexj.core.persistence.sql.[DbName]SQLAdapter.java</code> extending <code>nexj.core.persistence.sql.SQLAdapter</code>
 
<code>nexj.core.persistence.sql.[DbName]SQLSchemaManager.java</code> extending <code>nexj.core.persistence.sql.SQLSchemaManager</code>
 
  
The following files should be edited and entries for the new SQL Adapter added:
+
By default, NexJ Express Unit tests are configured to test the MySQL Adapter.<br>
<code>nexj.core.meta.persistence.sql.RelationalDatabase.java</code>
+
The instructions that follow outline instructions for configuring Unit tests to be run for other SQL Adapters.<br>
<code>nexj.core.meta.peristence.sql.RelationalDatabaseFragment.java</code>
+
''For this manual, reference will be made to the PostgreSQL Adapter but it will work the same for other adapters''<br>
<code>nexj.core.meta.sys.system.dstypes</code>
 
<code>nexj.core.persistence.sql.SQLSchemaManagerFactory.java</code>
 
<code>nexj.core.util.JDBCInfo.java</code>
 
  
====Environment Files====
+
==== Prerequisite ====
 +
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>
 +
<br>The following files should be edited and entries for the new SQL Adapter added:
 +
<br><code>nexj.core.meta.persistence.sql.RelationalDatabase.java</code>
 +
<br><code>nexj.core.meta.peristence.sql.RelationalDatabaseFragment.java</code>
 +
<br><code>nexj.core.meta.sys.system.dstypes</code>
 +
<br><code>nexj.core.persistence.sql.SQLSchemaManagerFactory.java</code>
 +
<br><code>nexj.core.util.JDBCInfo.java</code>
 +
 
 +
==== Environment Files ====

Revision as of 12:43, 26 February 2011

Debugging a Non-Default SQL Adapter

Summary

By default, NexJ Express Unit tests are configured to test the MySQL Adapter.
The instructions that follow outline instructions for configuring Unit tests to be run for other SQL Adapters.
For this manual, reference will be made to the PostgreSQL Adapter but it will work the same for other adapters

Prerequisite

The following files must exist for the new SQL Adapter:
src
nexj.core.persistence.sql.[DbName]SQLAdapter.java extending nexj.core.persistence.sql.SQLAdapter
nexj.core.persistence.sql.[DbName]SQLSchemaManager.java extending nexj.core.persistence.sql.SQLSchemaManager
test
nexj.core.persistence.sql.[DbName]SQLAdapterTest.java extending nexj.core.persistence.sql.SQLAdapterTest
nexj.core.persistence.sql.[DbName]SQLSchemaManagerTest.java extending nexj.core.persistence.sql.SQLSchemaManagerTest

The following files should be edited and entries for the new SQL Adapter added:
nexj.core.meta.persistence.sql.RelationalDatabase.java
nexj.core.meta.peristence.sql.RelationalDatabaseFragment.java
nexj.core.meta.sys.system.dstypes
nexj.core.persistence.sql.SQLSchemaManagerFactory.java
nexj.core.util.JDBCInfo.java

Environment Files