cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1098617 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne: FlattenedRelationshipsTest.java reflect/MixedPersistenceStrategyTest.java
Date Mon, 02 May 2011 14:59:47 GMT
Author: aadamchik
Date: Mon May  2 14:59:47 2011
New Revision: 1098617

URL: http://svn.apache.org/viewvc?rev=1098617&view=rev
Log:
test operation ordering fix

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/FlattenedRelationshipsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/FlattenedRelationshipsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/FlattenedRelationshipsTest.java?rev=1098617&r1=1098616&r2=1098617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/FlattenedRelationshipsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/FlattenedRelationshipsTest.java
Mon May  2 14:59:47 2011
@@ -21,7 +21,6 @@ package org.apache.cayenne;
 
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.cayenne.access.DataContext;
 import org.apache.cayenne.di.Inject;
@@ -62,12 +61,12 @@ public class FlattenedRelationshipsTest 
 
     @Override
     protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("FLATTENED_TEST_1");
-        dbHelper.deleteAll("FLATTENED_TEST_2");
-        dbHelper.deleteAll("FLATTENED_TEST_3");
         dbHelper.deleteAll("COMPLEX_JOIN");
-        dbHelper.deleteAll("FLATTENED_CIRCULAR");
+        dbHelper.deleteAll("FLATTENED_TEST_3");
+        dbHelper.deleteAll("FLATTENED_TEST_2");
+        dbHelper.deleteAll("FLATTENED_TEST_1");
         dbHelper.deleteAll("FLATTENED_CIRCULAR_JOIN");
+        dbHelper.deleteAll("FLATTENED_CIRCULAR");
 
         tFlattenedTest1 = new TableHelper(dbHelper, "FLATTENED_TEST_1");
         tFlattenedTest1.setColumns("FT1_ID", "NAME");
@@ -249,7 +248,7 @@ public class FlattenedRelationshipsTest 
         assertTrue(ft3.readPropertyDirectly("toFT1") instanceof Fault);
 
         // test that taking a snapshot does not trigger a fault, and generally works well
-        Map snapshot = context.currentSnapshot(ft3);
+        DataRow snapshot = context.currentSnapshot(ft3);
 
         assertEquals("ft3", snapshot.get("NAME"));
         assertTrue(ft3.readPropertyDirectly("toFT1") instanceof Fault);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyTest.java?rev=1098617&r1=1098616&r2=1098617&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyTest.java
Mon May  2 14:59:47 2011
@@ -32,38 +32,41 @@ import org.apache.cayenne.unit.di.server
 
 /**
  * Tests conflicts between field and map-based persistence.
- * 
  */
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class MixedPersistenceStrategyTest extends ServerCase {
 
     @Inject
     protected ObjectContext context;
-    
+
     @Inject
     protected DBHelper dbHelper;
-    
+
     protected TableHelper tMixedPersistenceStrategy;
     protected TableHelper tMixedPersistenceStrategy2;
-    
+
     @Override
     protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MIXED_PERSISTENCE_STRATEGY");
         dbHelper.deleteAll("MIXED_PERSISTENCE_STRATEGY2");
-        
-        tMixedPersistenceStrategy = new TableHelper(dbHelper, "MIXED_PERSISTENCE_STRATEGY");
+        dbHelper.deleteAll("MIXED_PERSISTENCE_STRATEGY");
+
+        tMixedPersistenceStrategy = new TableHelper(
+                dbHelper,
+                "MIXED_PERSISTENCE_STRATEGY");
         tMixedPersistenceStrategy.setColumns("ID", "DESCRIPTION", "NAME");
-        
-        tMixedPersistenceStrategy2 = new TableHelper(dbHelper, "MIXED_PERSISTENCE_STRATEGY2");
+
+        tMixedPersistenceStrategy2 = new TableHelper(
+                dbHelper,
+                "MIXED_PERSISTENCE_STRATEGY2");
         tMixedPersistenceStrategy2.setColumns("ID", "MASTER_ID", "NAME");
     }
-    
+
     protected void createConflictingFieldDataSet() throws Exception {
         tMixedPersistenceStrategy.insert(1, "d1", "n1");
         tMixedPersistenceStrategy2.insert(1, 1, "dn1");
         tMixedPersistenceStrategy2.insert(2, 1, "dn2");
     }
-    
+
     public void testConflictingField1() throws Exception {
 
         createConflictingFieldDataSet();



Mime
View raw message