tfischer 2005/06/09 23:02:07
Modified: src/rttest/org/apache/torque DataTest.java
Log:
Added the testcase testNullConnection which check if methods also work when a
null connection is supplied
Revision Changes Path
1.24 +20 -1 db-torque/src/rttest/org/apache/torque/DataTest.java
Index: DataTest.java
===================================================================
RCS file: /home/cvs/db-torque/src/rttest/org/apache/torque/DataTest.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- DataTest.java 9 Jun 2005 21:22:14 -0000 1.23
+++ DataTest.java 10 Jun 2005 06:02:07 -0000 1.24
@@ -400,6 +400,25 @@
}
/**
+ * test the behaviour if a connection is supplied to access the database,
+ * but it is null. All methods on the user level should be able to
+ * handle this.
+ */
+ public void testNullConnection() throws Exception
+ {
+ Criteria criteria = new Criteria();
+ List result = BookPeer.doSelectVillageRecords(criteria, null);
+
+ criteria = new Criteria();
+ criteria.add(BookPeer.BOOK_ID, (Long) null, Criteria.NOT_EQUAL);
+ BookPeer.doDelete(criteria, null);
+
+ Author author = new Author();
+ author.setName("name");
+ author.save((Connection) null);
+ }
+
+ /**
* test joins
* @throws Exception if the test fails
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]