cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1101569 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ReturnTypesMappingTest.java
Date Tue, 10 May 2011 18:00:52 GMT
Author: aadamchik
Date: Tue May 10 18:00:52 2011
New Revision: 1101569

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

patch by Dzmitry Kazimirchyk - ReturnTypesMappingTest

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

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ReturnTypesMappingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ReturnTypesMappingTest.java?rev=1101569&r1=1101568&r2=1101569&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ReturnTypesMappingTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/ReturnTypesMappingTest.java
Tue May 10 18:00:52 2011
@@ -25,26 +25,32 @@ import java.util.Calendar;
 import java.util.Date;
 
 import org.apache.cayenne.DataRow;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.NamedQuery;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.testmap.DateTestEntity;
 import org.apache.cayenne.testdo.testmap.ReturnTypesMap1;
 import org.apache.cayenne.testdo.testmap.ReturnTypesMap2;
-import org.apache.cayenne.unit.CayenneCase;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
 /**
  * Test Types mapping for selected columns
  */
-public class ReturnTypesMappingTest extends CayenneCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class ReturnTypesMappingTest extends ServerCase {
 
-    protected DataContext context;
+    @Inject
+    private DataContext context;
+    
+    @Inject
+    private DBHelper dbHelper;
 
     @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        deleteTestData();
-        context = createDataContext();
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("TYPES_MAPPING_TEST1");
+        dbHelper.deleteAll("TYPES_MAPPING_TEST2");
     }
 
     public void testBIGINT() throws Exception {



Mime
View raw message