cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1103350 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ProcedureQueryCacheKeyTest.java
Date Sun, 15 May 2011 12:43:05 GMT
Author: aadamchik
Date: Sun May 15 12:43:05 2011
New Revision: 1103350

URL: http://svn.apache.org/viewvc?rev=1103350&view=rev
Log:
CAY-1564 CayenneCase unit tests conversion(4)

patch by Dzmitry Kazimirchyk - ProcedureQueryCacheKeyTest

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ProcedureQueryCacheKeyTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ProcedureQueryCacheKeyTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ProcedureQueryCacheKeyTest.java?rev=1103350&r1=1103349&r2=1103350&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ProcedureQueryCacheKeyTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ProcedureQueryCacheKeyTest.java
Sun May 15 12:43:05 2011
@@ -18,15 +18,22 @@
  ****************************************************************/
 package org.apache.cayenne.query;
 
+import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.testdo.testmap.Artist;
-import org.apache.cayenne.unit.CayenneCase;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
-public class ProcedureQueryCacheKeyTest extends CayenneCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class ProcedureQueryCacheKeyTest extends ServerCase {
+
+    @Inject
+    private ServerRuntime runtime;
 
     public void testNoCache() {
 
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
 
         ProcedureQuery query = new ProcedureQuery("ABC", Artist.class);
 
@@ -42,7 +49,7 @@ public class ProcedureQueryCacheKeyTest 
 
     public void testLocalCache() {
 
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
 
         ProcedureQuery query = new ProcedureQuery("ABC", Artist.class);
 
@@ -55,7 +62,7 @@ public class ProcedureQueryCacheKeyTest 
 
     public void testSharedCache() {
 
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
 
         ProcedureQuery query = new ProcedureQuery("ABC", Artist.class);
 
@@ -68,7 +75,7 @@ public class ProcedureQueryCacheKeyTest 
 
     public void testNamedQuery() {
 
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
 
         ProcedureQuery query = new ProcedureQuery("ABC", Artist.class);
 



Mime
View raw message