cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1103026 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/ejbql/EJBQLCompiledExpressionTest.java
Date Sat, 14 May 2011 10:49:45 GMT
Author: aadamchik
Date: Sat May 14 10:49:44 2011
New Revision: 1103026

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

    patch by Dzmitry Kazimirchyk - EJBQLCompiledExpressionTest

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

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/ejbql/EJBQLCompiledExpressionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/ejbql/EJBQLCompiledExpressionTest.java?rev=1103026&r1=1103025&r2=1103026&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/ejbql/EJBQLCompiledExpressionTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/ejbql/EJBQLCompiledExpressionTest.java
Sat May 14 10:49:44 2011
@@ -18,14 +18,21 @@
  ****************************************************************/
 package org.apache.cayenne.ejbql;
 
+import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.EntityResolver;
-import org.apache.cayenne.unit.CayenneCase;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
-public class EJBQLCompiledExpressionTest extends CayenneCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class EJBQLCompiledExpressionTest extends ServerCase {
+    
+    @Inject
+    protected ServerRuntime runtime;
 
     public void testGetSource() {
         String source = "select a from Artist a";
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
         EJBQLParser parser = EJBQLParserFactory.getParser();
 
         EJBQLCompiledExpression select = parser.compile(source, resolver);
@@ -34,7 +41,7 @@ public class EJBQLCompiledExpressionTest
 
     public void testGetExpression() {
         String source = "select a from Artist a";
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
         EJBQLParser parser = EJBQLParserFactory.getParser();
 
         EJBQLCompiledExpression select = parser.compile(source, resolver);
@@ -42,7 +49,7 @@ public class EJBQLCompiledExpressionTest
     }
 
     public void testGetEntityDescriptor() {
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
         EJBQLParser parser = EJBQLParserFactory.getParser();
 
         EJBQLCompiledExpression select = parser.compile(
@@ -65,7 +72,7 @@ public class EJBQLCompiledExpressionTest
     }
 
     public void testGetRootDescriptor() {
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
         EJBQLParser parser = EJBQLParserFactory.getParser();
 
         EJBQLCompiledExpression select = parser.compile(
@@ -77,7 +84,7 @@ public class EJBQLCompiledExpressionTest
     }
 
     public void testGetEntityDescriptorCaseSensitivity() {
-        EntityResolver resolver = getDomain().getEntityResolver();
+        EntityResolver resolver = runtime.getDataDomain().getEntityResolver();
         EJBQLParser parser = EJBQLParserFactory.getParser();
 
         EJBQLCompiledExpression select1 = parser.compile(



Mime
View raw message