cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1098681 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access: DataContextPaginatedQueryTest.java OptimisticLockingTest.java
Date Mon, 02 May 2011 17:35:22 GMT
Author: aadamchik
Date: Mon May  2 17:35:21 2011
New Revision: 1098681

URL: http://svn.apache.org/viewvc?rev=1098681&view=rev
Log:
op reordering; refactoring

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPaginatedQueryTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPaginatedQueryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPaginatedQueryTest.java?rev=1098681&r1=1098680&r2=1098681&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPaginatedQueryTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextPaginatedQueryTest.java
Mon May  2 17:35:21 2011
@@ -35,7 +35,7 @@ import org.apache.cayenne.unit.di.server
 public class DataContextPaginatedQueryTest extends ServerCase {
 
     @Inject
-    protected ObjectContext context;
+    protected DataContext context;
 
     @Inject
     protected DBHelper dbHelper;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java?rev=1098681&r1=1098680&r2=1098681&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/OptimisticLockingTest.java
Mon May  2 17:35:21 2011
@@ -50,8 +50,8 @@ public class OptimisticLockingTest exten
     @Override
     protected void setUpAfterInjection() throws Exception {
         dbHelper.deleteAll("LOCKING_HELPER");
-        dbHelper.deleteAll("SIMPLE_LOCKING_TEST");
         dbHelper.deleteAll("REL_LOCKING_TEST");
+        dbHelper.deleteAll("SIMPLE_LOCKING_TEST");
 
         tSimpleLockingTest = new TableHelper(dbHelper, "SIMPLE_LOCKING_TEST");
         tSimpleLockingTest.setColumns("LOCKING_TEST_ID", "NAME", "DESCRIPTION");
@@ -99,9 +99,11 @@ public class OptimisticLockingTest exten
     }
 
     protected void createSimpleLockUpdate() throws Exception {
-        tSimpleLockingTest.update().set("NAME", "LockTest1Updated").where(
-                "LOCKING_TEST_ID",
-                1).execute();
+        assertEquals(1, tSimpleLockingTest
+                .update()
+                .set("NAME", "LockTest1Updated")
+                .where("LOCKING_TEST_ID", 1)
+                .execute());
     }
 
     protected void createRelLockUpdate() throws Exception {
@@ -488,7 +490,7 @@ public class OptimisticLockingTest exten
         }
         catch (OptimisticLockException ex) {
             Map<?, ?> freshFailedRow = ex.getFreshSnapshot(context);
-            assertNull(freshFailedRow);
+            assertNull("" + freshFailedRow, freshFailedRow);
         }
     }
 }



Mime
View raw message