cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1103407 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLTemplateCacheKeyTest.java
Date Sun, 15 May 2011 14:47:51 GMT
Author: aadamchik
Date: Sun May 15 14:47:51 2011
New Revision: 1103407

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

patch by Dzmitry Kazimirchyk - SQLTemplateCacheKeyTest

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

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLTemplateCacheKeyTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLTemplateCacheKeyTest.java?rev=1103407&r1=1103406&r2=1103407&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLTemplateCacheKeyTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/SQLTemplateCacheKeyTest.java
Sun May 15 14:47:51 2011
@@ -18,15 +18,19 @@
  ****************************************************************/
 package org.apache.cayenne.query;
 
+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 SQLTemplateCacheKeyTest extends CayenneCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class SQLTemplateCacheKeyTest extends ServerCase {
 
-    public void testNoCache() {
+    @Inject
+    private EntityResolver resolver;
 
-        EntityResolver resolver = getDomain().getEntityResolver();
+    public void testNoCache() {
 
         SQLTemplate query = new SQLTemplate(Artist.class, "SELECT ME");
 
@@ -42,8 +46,6 @@ public class SQLTemplateCacheKeyTest ext
 
     public void testLocalCache() {
 
-        EntityResolver resolver = getDomain().getEntityResolver();
-
         SQLTemplate query = new SQLTemplate(Artist.class, "SELECT ME");
 
         query.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
@@ -55,8 +57,6 @@ public class SQLTemplateCacheKeyTest ext
 
     public void testSharedCache() {
 
-        EntityResolver resolver = getDomain().getEntityResolver();
-
         SQLTemplate query = new SQLTemplate(Artist.class, "SELECT ME");
 
         query.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
@@ -68,8 +68,6 @@ public class SQLTemplateCacheKeyTest ext
 
     public void testNamedQuery() {
 
-        EntityResolver resolver = getDomain().getEntityResolver();
-
         SQLTemplate query = new SQLTemplate(Artist.class, "SELECT ME");
 
         query.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);



Mime
View raw message