cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r606547 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map: AshwoodEntitySorterTest.java ClientEntityResolverTest.java DataMapTest.java
Date Sun, 23 Dec 2007 10:41:58 GMT
Author: aadamchik
Date: Sun Dec 23 02:41:55 2007
New Revision: 606547

URL: http://svn.apache.org/viewvc?rev=606547&view=rev
Log:
generics

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/AshwoodEntitySorterTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/ClientEntityResolverTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/AshwoodEntitySorterTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/AshwoodEntitySorterTest.java?rev=606547&r1=606546&r2=606547&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/AshwoodEntitySorterTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/AshwoodEntitySorterTest.java
Sun Dec 23 02:41:55 2007
@@ -30,6 +30,7 @@
  * @author Andrus Adamchik
  */
 public class AshwoodEntitySorterTest extends RelationshipCase {
+
     protected AshwoodEntitySorter sorter;
 
     protected void setUp() throws Exception {
@@ -42,11 +43,11 @@
     public void testSortObjectsForEntityReflexiveWithFaults() throws Exception {
         createTestData("testSortObjectsForEntityDeletedWithFaults");
 
-        ObjEntity entity =
-            getDomain().getEntityResolver().lookupObjEntity(ReflexiveAndToOne.class);
+        ObjEntity entity = getDomain().getEntityResolver().lookupObjEntity(
+                ReflexiveAndToOne.class);
 
-        List objects =
-            createDataContext().performQuery(new SelectQuery(ReflexiveAndToOne.class));
+        List<?> objects = createDataContext().performQuery(
+                new SelectQuery(ReflexiveAndToOne.class));
         Collections.shuffle(objects);
         assertEquals(3, objects.size());
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/ClientEntityResolverTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/ClientEntityResolverTest.java?rev=606547&r1=606546&r2=606547&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/ClientEntityResolverTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/ClientEntityResolverTest.java
Sun Dec 23 02:41:55 2007
@@ -36,11 +36,13 @@
 
         DataMap dataMap = new DataMap("test");
         dataMap.addObjEntity(entity);
-        Collection entities = Collections.singleton(dataMap);
-        EntityResolver resolver = new EntityResolver(entities);
+        Collection<DataMap> maps = Collections.singleton(dataMap);
+        EntityResolver resolver = new EntityResolver(maps);
 
         // 1. simple case
-        Object c1 = HessianUtil.cloneViaClientServerSerialization(resolver, new EntityResolver());
+        Object c1 = HessianUtil.cloneViaClientServerSerialization(
+                resolver,
+                new EntityResolver());
 
         assertNotNull(c1);
         assertTrue(c1 instanceof EntityResolver);
@@ -66,8 +68,8 @@
         entity.setClassName("java.lang.String");
         DataMap dataMap = new DataMap("test");
         dataMap.addObjEntity(entity);
-        Collection entities = Collections.singleton(dataMap);
-        EntityResolver resolver = new EntityResolver(entities);
+        Collection<DataMap> maps = Collections.singleton(dataMap);
+        EntityResolver resolver = new EntityResolver(maps);
 
         assertSame(entity, resolver.getObjEntity(entity.getName()));
         assertNotNull(resolver.getObjEntity(entity.getName()));
@@ -93,8 +95,8 @@
         DataMap dataMap = new DataMap("test");
         dataMap.addObjEntity(superEntity);
         dataMap.addObjEntity(subEntity);
-        Collection entities = Collections.singleton(dataMap);
-        new EntityResolver(entities);
+        Collection<DataMap> maps = Collections.singleton(dataMap);
+        new EntityResolver(maps);
 
         // after registration with resolver super entity should resolve just fine
         assertSame(superEntity, subEntity.getSuperEntity());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java?rev=606547&r1=606546&r2=606547&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
Sun Dec 23 02:41:55 2007
@@ -28,6 +28,7 @@
 import org.apache.cayenne.project.NamedObjectFactory;
 import org.apache.cayenne.query.AbstractQuery;
 import org.apache.cayenne.query.MockAbstractQuery;
+import org.apache.cayenne.query.Query;
 import org.apache.cayenne.remote.hessian.service.HessianUtil;
 import org.apache.cayenne.util.Util;
 
@@ -63,7 +64,7 @@
     }
 
     public void testInitWithProperties() {
-        Map properties = new HashMap();
+        Map<String, Object> properties = new HashMap<String, Object>();
         properties.put(DataMap.CLIENT_SUPPORTED_PROPERTY, "true");
         properties.put(DataMap.DEFAULT_CLIENT_PACKAGE_PROPERTY, "aaaaa");
 
@@ -296,7 +297,7 @@
         AbstractQuery q = new MockAbstractQuery("a");
         DataMap map = new DataMap();
         map.addQuery(q);
-        Map queries = map.getQueryMap();
+        Map<String, Query> queries = map.getQueryMap();
         assertEquals(1, queries.size());
         assertSame(q, queries.get("a"));
     }
@@ -372,8 +373,8 @@
 
     protected void checkProcedures(DataMap map, String[] expectedNames) throws Exception
{
         int len = expectedNames.length;
-        Map proceduresMap = map.getProcedureMap();
-        Collection proceduresCollection = map.getProcedures();
+        Map<String, Procedure> proceduresMap = map.getProcedureMap();
+        Collection<Procedure> proceduresCollection = map.getProcedures();
 
         assertNotNull(proceduresMap);
         assertEquals(len, proceduresMap.size());



Mime
View raw message