cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r609213 - /cayenne/main/trunk/itests/jpa-chapter2/src/test/java/org/apache/cayenne/jpa/itest/ch2/_2_1_8_1_BidiOneToOneRelationshipsTest.java
Date Sat, 05 Jan 2008 20:52:39 GMT
Author: aadamchik
Date: Sat Jan  5 12:52:37 2008
New Revision: 609213

URL: http://svn.apache.org/viewvc?rev=609213&view=rev
Log:
new itest db utilities to simplify single table operations
(switching existing tests)

Modified:
    cayenne/main/trunk/itests/jpa-chapter2/src/test/java/org/apache/cayenne/jpa/itest/ch2/_2_1_8_1_BidiOneToOneRelationshipsTest.java

Modified: cayenne/main/trunk/itests/jpa-chapter2/src/test/java/org/apache/cayenne/jpa/itest/ch2/_2_1_8_1_BidiOneToOneRelationshipsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/jpa-chapter2/src/test/java/org/apache/cayenne/jpa/itest/ch2/_2_1_8_1_BidiOneToOneRelationshipsTest.java?rev=609213&r1=609212&r2=609213&view=diff
==============================================================================
--- cayenne/main/trunk/itests/jpa-chapter2/src/test/java/org/apache/cayenne/jpa/itest/ch2/_2_1_8_1_BidiOneToOneRelationshipsTest.java
(original)
+++ cayenne/main/trunk/itests/jpa-chapter2/src/test/java/org/apache/cayenne/jpa/itest/ch2/_2_1_8_1_BidiOneToOneRelationshipsTest.java
Sat Jan  5 12:52:37 2008
@@ -32,20 +32,12 @@
 
     // TODO: andrus 8/10/2006 - fails
     public void _testDefaults() throws Exception {
-        getDbHelper().deleteAll("BidiOneToOneOwned");
-        getDbHelper().deleteAll("BidiOneToOneOwner");
 
-        getDbHelper().insert("BidiOneToOneOwned", new String[] {
-            "id"
-        }, new Object[] {
-            5
-        });
-
-        getDbHelper().insert("BidiOneToOneOwner", new String[] {
-                "id", "owned_id"
-        }, new Object[] {
-                4, 5
-        });
+        getTableHelper("BidiOneToOneOwned").deleteAll().setColumns("id").insert(5);
+        getTableHelper("BidiOneToOneOwner")
+                .deleteAll()
+                .setColumns("id", "owned_id")
+                .insert(4, 5);
 
         BidiOneToOneOwner owner = getEntityManager().find(BidiOneToOneOwner.class, 4);
         assertNotNull(owner);



Mime
View raw message