db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "ConvertOldTestToJunitTips" by RaminMoazeni
Date Thu, 02 Aug 2007 22:40:06 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by RaminMoazeni:
http://wiki.apache.org/db-derby/ConvertOldTestToJunitTips

------------------------------------------------------------------------------
       Normally to get a connection to the default database, you should use [http://db.apache.org/derby/javadoc/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.html#getConnection()
getConnection()] This is a single connection that is reused so if you call getConnection twice,
you will get the same connection.  If you want a secondary connection, use [http://db.apache.org/derby/javadoc/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.html#openDefaultConnection()
openDefaultConnection]
     * Not removing the old test files. 
       You should remove the old test files, canons and remove the old test from its suite.
This includes references in any junit *!HarnessJavaTest classes. ant clobber before you build,
to make sure their are no residual dependencies on the old test files.
+    * Closing the statements created with createStatement() 
+      There is no need to close the statements created with createStatement() as they are
now cleaned up automatically.
     * Omitting the `fail` assert method after a method call in a try-catch block if that
method is expected to fail by throwing an exception.  The following code would not fail if
the Statement.execute() method succeeds.
  {{{
  try {

Mime
View raw message