cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1101607 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java
Date Tue, 10 May 2011 19:19:31 GMT
Author: aadamchik
Date: Tue May 10 19:19:30 2011
New Revision: 1101607

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

patch by Dzmitry Kazimirchyk - DataDomainTest

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

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java?rev=1101607&r1=1101606&r2=1101607&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java
Tue May 10 19:19:30 2011
@@ -23,15 +23,19 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.event.DefaultEventManager;
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.ObjEntity;
-import org.apache.cayenne.unit.CayenneCase;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
-/**
- * DataDomain unit tests.
- */
-public class DataDomainTest extends CayenneCase {
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class DataDomainTest extends ServerCase {
+
+    @Inject
+    private ServerRuntime runtime;
 
     public void testName() throws Exception {
         DataDomain domain = new DataDomain("some name");
@@ -103,14 +107,14 @@ public class DataDomainTest extends Caye
     }
 
     public void testEntityResolver() {
-        assertNotNull(getDomain().getEntityResolver());
+        assertNotNull(runtime.getDataDomain().getEntityResolver());
 
         DataDomain domain = new DataDomain("dom1");
         assertNotNull(domain.getEntityResolver());
     }
 
     public void testInitDataDomainWithSharedCache() throws Exception {
-        Map properties = new HashMap();
+        Map<Object, Object> properties = new HashMap<Object, Object>();
         properties.put(DataDomain.SHARED_CACHE_ENABLED_PROPERTY, Boolean.TRUE.toString());
 
         DataDomain domain = new DataDomain("d1", properties);
@@ -118,7 +122,7 @@ public class DataDomainTest extends Caye
     }
 
     public void testInitDataDomainWithDedicatedCache() throws Exception {
-        Map properties = new HashMap();
+        Map<Object, Object> properties = new HashMap<Object, Object>();
         properties
                 .put(DataDomain.SHARED_CACHE_ENABLED_PROPERTY, Boolean.FALSE.toString());
 
@@ -127,7 +131,7 @@ public class DataDomainTest extends Caye
     }
 
     public void testInitDataDomainValidation() throws Exception {
-        Map properties = new HashMap();
+        Map<Object, Object> properties = new HashMap<Object, Object>();
         properties.put(DataDomain.VALIDATING_OBJECTS_ON_COMMIT_PROPERTY, Boolean.TRUE
                 .toString());
 
@@ -136,7 +140,7 @@ public class DataDomainTest extends Caye
     }
 
     public void testInitDataDomainNoValidation() throws Exception {
-        Map properties = new HashMap();
+        Map<Object, Object> properties = new HashMap<Object, Object>();
         properties.put(DataDomain.VALIDATING_OBJECTS_ON_COMMIT_PROPERTY, Boolean.FALSE
                 .toString());
 
@@ -145,7 +149,7 @@ public class DataDomainTest extends Caye
     }
 
     public void testDataDomainInternalTransactions() throws Exception {
-        Map properties = new HashMap();
+        Map<Object, Object> properties = new HashMap<Object, Object>();
         properties.put(DataDomain.USING_EXTERNAL_TRANSACTIONS_PROPERTY, Boolean.FALSE
                 .toString());
 
@@ -157,7 +161,7 @@ public class DataDomainTest extends Caye
     }
 
     public void testDataDomainExternalTransactions() throws Exception {
-        Map properties = new HashMap();
+        Map<Object, Object> properties = new HashMap<Object, Object>();
         properties.put(DataDomain.USING_EXTERNAL_TRANSACTIONS_PROPERTY, Boolean.TRUE
                 .toString());
 



Mime
View raw message