cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1507809 - /cayenne/main/trunk/framework/cayenne-core-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java
Date Sun, 28 Jul 2013 16:15:04 GMT
Author: aadamchik
Date: Sun Jul 28 16:15:03 2013
New Revision: 1507809

URL: http://svn.apache.org/r1507809
Log:
generics in unit tests

Modified:
    cayenne/main/trunk/framework/cayenne-core-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java

Modified: cayenne/main/trunk/framework/cayenne-core-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-core-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java?rev=1507809&r1=1507808&r2=1507809&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-core-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-core-unpublished/src/test/java/org/apache/cayenne/access/DataContextTest.java
Sun Jul 28 16:15:03 2013
@@ -459,13 +459,13 @@ public class DataContextTest extends Ser
     public void testPerformPaginatedQuery() throws Exception {
         createArtistsDataSet();
 
-        SelectQuery query = new SelectQuery(Artist.class);
+        SelectQuery<Artist> query = SelectQuery.query(Artist.class);
         query.setPageSize(5);
-        List<?> objects = context.performQuery(query);
+        List<Artist> objects = context.select(query);
         assertNotNull(objects);
         assertTrue(objects instanceof IncrementalFaultList<?>);
-        assertTrue(((IncrementalFaultList<?>) objects).elements.get(0) instanceof Long);
-        assertTrue(((IncrementalFaultList<?>) objects).elements.get(6) instanceof Long);
+        assertTrue(((IncrementalFaultList<Artist>) objects).elements.get(0) instanceof
Long);
+        assertTrue(((IncrementalFaultList<Artist>) objects).elements.get(6) instanceof
Long);
 
         assertTrue(objects.get(0) instanceof Artist);
     }



Mime
View raw message