openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fa...@apache.org
Subject svn commit: r741691 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java
Date Fri, 06 Feb 2009 19:44:56 GMT
Author: fancy
Date: Fri Feb  6 19:44:55 2009
New Revision: 741691

URL: http://svn.apache.org/viewvc?rev=741691&view=rev
Log:
OPENJPA-807 JPQ2 JPQL  fix testcase

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java?rev=741691&r1=741690&r2=741691&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java
Fri Feb  6 19:44:55 2009
@@ -48,7 +48,7 @@
         CompUser user1 = createUser("Seetha", "MAC", add[0], 36, true);
         CompUser user2 = createUser("Shannon ", "PC", add[1], 36, false);
         CompUser user3 = createUser("Ugo", "PC", add[2], 19, true);
-        CompUser user4 = createUser("_Jacob", "LINUX", add[3], 10, true);
+        CompUser user4 = createUser("Jacob", "LINUX", add[3], 10, true);
         CompUser user5 = createUser("Famzy", "UNIX", add[4], 29, false);
         CompUser user6 = createUser("Shade", "UNIX", add[5], 23, false);
 
@@ -76,10 +76,10 @@
 
         String query = "SELECT e.name, " +
             "COALESCE (e.address.country, 'Unknown')" +
-            " FROM CompUser e";
+            " FROM CompUser e ORDER BY e.name DESC";
         List rs = em.createQuery(query).getResultList();
         Object[] result = (Object[]) rs.get(rs.size()-1);
-        assertEquals("the name is not shade", "Shade", result[0]);        
+        assertEquals("the name is not famzy", "Famzy", result[0]);        
         assertEquals("Unknown", result[1]);
 
         endTx(em);
@@ -93,7 +93,7 @@
 
         String query = "SELECT e.name, " +
             "NULLIF (e.address.country, 'USA')" +
-            " FROM CompUser e";
+            " FROM CompUser e ORDER BY e.name DESC";
 
         List rs = em.createQuery(query).getResultList();
         Object[] result = (Object[]) rs.get(1);



Mime
View raw message