cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1101548 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java
Date Tue, 10 May 2011 17:21:37 GMT
Author: aadamchik
Date: Tue May 10 17:21:36 2011
New Revision: 1101548

URL: http://svn.apache.org/viewvc?rev=1101548&view=rev
Log:
CAY-1563 CayenneCase unit tests conversion(3)

patch by Dzmitry Kazimirchyk - OrderingTranslatorTest + direct injection of DataNode

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

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java?rev=1101548&r1=1101547&r2=1101548&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/trans/OrderingTranslatorTest.java
Tue May 10 17:21:36 2011
@@ -20,12 +20,19 @@
 package org.apache.cayenne.access.trans;
 
 import org.apache.cayenne.TranslationCase;
+import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.query.SortOrder;
 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 OrderingTranslatorTest extends CayenneCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class OrderingTranslatorTest extends ServerCase {
+
+    @Inject
+    private DataNode node;
 
     /**
      * Tests ascending ordering on string attribute.
@@ -34,7 +41,7 @@ public class OrderingTranslatorTest exte
         SelectQuery q = new SelectQuery(Artist.class);
         q.addOrdering("artistName", SortOrder.ASCENDING);
 
-        TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
+        TstQueryAssembler qa = new TstQueryAssembler(node, q);
 
         try {
             TranslationCase tstCase = new TranslationCase(
@@ -60,7 +67,7 @@ public class OrderingTranslatorTest exte
         SelectQuery q = new SelectQuery(Artist.class);
         q.addOrdering("artistName", SortOrder.DESCENDING);
 
-        TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
+        TstQueryAssembler qa = new TstQueryAssembler(node, q);
 
         try {
             TranslationCase tstCase = new TranslationCase(
@@ -86,7 +93,7 @@ public class OrderingTranslatorTest exte
         SelectQuery q = new SelectQuery(Artist.class);
         q.addOrdering("artistName", SortOrder.ASCENDING_INSENSITIVE);
 
-        TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
+        TstQueryAssembler qa = new TstQueryAssembler(node, q);
 
         try {
             TranslationCase tstCase = new TranslationCase(
@@ -112,7 +119,7 @@ public class OrderingTranslatorTest exte
         q.addOrdering("artistName", SortOrder.DESCENDING_INSENSITIVE);
         q.addOrdering("paintingArray.estimatedPrice", SortOrder.ASCENDING);
 
-        TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
+        TstQueryAssembler qa = new TstQueryAssembler(node, q);
 
         try {
             TranslationCase tstCase = new TranslationCase(
@@ -144,7 +151,7 @@ public class OrderingTranslatorTest exte
         q.addOrdering("artistName", SortOrder.ASCENDING_INSENSITIVE);
         q.addOrdering("paintingArray.estimatedPrice", SortOrder.ASCENDING_INSENSITIVE);
 
-        TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
+        TstQueryAssembler qa = new TstQueryAssembler(node, q);
 
         try {
             TranslationCase tstCase = new TranslationCase(
@@ -178,7 +185,7 @@ public class OrderingTranslatorTest exte
         q.addOrdering("artistName", SortOrder.DESCENDING);
         q.addOrdering("paintingArray.estimatedPrice", SortOrder.ASCENDING);
 
-        TstQueryAssembler qa = new TstQueryAssembler(getNode(), q);
+        TstQueryAssembler qa = new TstQueryAssembler(node, q);
 
         try {
             TranslationCase tstCase = new TranslationCase(



Mime
View raw message