cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkazimirc...@apache.org
Subject svn commit: r1170706 [2/2] - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/access/jdbc/ main/java/org/apache/cayenne/access/trans/ main/java/org/apache/cayenne/dba/ main/java/org/apache/cayenne/dba/db2/ m...
Date Wed, 14 Sep 2011 16:41:05 GMT
Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/postgres/PostgresAdapterTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/postgres/PostgresAdapterTest.java?rev=1170706&r1=1170705&r2=1170706&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/postgres/PostgresAdapterTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/postgres/PostgresAdapterTest.java
Wed Sep 14 16:41:03 2011
@@ -20,16 +20,23 @@ package org.apache.cayenne.dba.postgres;
 
 import java.sql.Types;
 
+import org.apache.cayenne.di.AdhocObjectFactory;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
-import junit.framework.TestCase;
-
-
-public class PostgresAdapterTest extends TestCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class PostgresAdapterTest extends ServerCase {
+    
+    @Inject
+    private AdhocObjectFactory objectFactory;
     
     public void testCreateTableWithFloatAttributeWithScale () {
-        PostgresAdapter adapter = new PostgresAdapter();
+        PostgresAdapter adapter = objectFactory.newInstance(
+                PostgresAdapter.class, 
+                PostgresAdapter.class.getName());
         DbEntity e = new DbEntity("Test");
         DbAttribute dblPrec = new DbAttribute("dbl1");
         dblPrec.setType(Types.FLOAT);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapterTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapterTest.java?rev=1170706&r1=1170705&r2=1170706&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapterTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/dba/sqlserver/SQLServerAdapterTest.java
Wed Sep 14 16:41:03 2011
@@ -20,16 +20,23 @@ package org.apache.cayenne.dba.sqlserver
 
 import java.sql.Types;
 
-import junit.framework.TestCase;
-
+import org.apache.cayenne.di.AdhocObjectFactory;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
-
-public class SQLServerAdapterTest extends TestCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class SQLServerAdapterTest extends ServerCase {
+    
+    @Inject
+    private AdhocObjectFactory objectFactory;
     
     public void testCreateTableWithFloatAttributeWithScale () {
-        SQLServerAdapter adapter = new SQLServerAdapter();
+        SQLServerAdapter adapter = objectFactory.newInstance(
+                SQLServerAdapter.class, 
+                SQLServerAdapter.class.getName());
         DbEntity e = new DbEntity("Test");
         DbAttribute dblPrec = new DbAttribute("dbl1");
         dblPrec.setType(Types.FLOAT);



Mime
View raw message