cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1073932 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java
Date Wed, 23 Feb 2011 20:37:11 GMT
Author: aadamchik
Date: Wed Feb 23 20:37:10 2011
New Revision: 1073932

URL: http://svn.apache.org/viewvc?rev=1073932&view=rev
Log:
tests cleanup

switching to DI

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

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java?rev=1073932&r1=1073931&r2=1073932&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java
Wed Feb 23 20:37:10 2011
@@ -19,20 +19,25 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.JdbcAdapter;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.InsertBatchQuery;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.GeneratedColumnTestEntity;
-import org.apache.cayenne.unit.CayenneCase;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
-/**
- */
-public class BatchActionTest extends CayenneCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class BatchActionTest extends ServerCase {
+
+    @Inject
+    private ServerRuntime runtime;
 
     public void testHasGeneratedKeys1() throws Exception {
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getChannel().getEntityResolver();
 
         // test with adapter that supports keys
         DbAdapter adapter = buildAdapter(true);
@@ -47,7 +52,7 @@ public class BatchActionTest extends Cay
     }
 
     public void testHasGeneratedKeys2() throws Exception {
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getChannel().getEntityResolver();
 
         // test with adapter that does not support keys...
         DbAdapter adapter = buildAdapter(false);



Mime
View raw message