cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r589150 - in /cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test: java/org/apache/cayenne/access/DataContextEJBQLConditionsTest.java resources/dml/access.DataContextEJBQLConditionsTest.xml
Date Sat, 27 Oct 2007 16:48:13 GMT
Author: aadamchik
Date: Sat Oct 27 09:48:13 2007
New Revision: 589150

URL: http://svn.apache.org/viewvc?rev=589150&view=rev
Log:
changing unit test to avoid comparing CHAR with VARCHAR

Modified:
    cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsTest.java
    cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/access.DataContextEJBQLConditionsTest.xml

Modified: cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsTest.java?rev=589150&r1=589149&r2=589150&view=diff
==============================================================================
--- cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsTest.java
(original)
+++ cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsTest.java
Sat Oct 27 09:48:13 2007
@@ -154,10 +154,10 @@
     }
 
     public void testInSubquery() throws Exception {
-        createTestData("prepareIn");
+        createTestData("prepareInSubquery");
 
         String ejbql = "SELECT p FROM Painting p WHERE p.paintingTitle IN ("
-                + "SELECT a1.artistName FROM Artist a1"
+                + "SELECT p1.paintingTitle FROM Painting p1 WHERE p1.paintingTitle = 'C'"
                 + ")";
 
         EJBQLQuery query = new EJBQLQuery(ejbql);
@@ -171,8 +171,8 @@
             ids.add(id);
         }
 
-        assertTrue(ids.contains(new Integer(33006)));
-        assertTrue(ids.contains(new Integer(33007)));
+        assertTrue(ids.contains(new Integer(33012)));
+        assertTrue(ids.contains(new Integer(33014)));
     }
 
     public void testCollectionEmpty() throws Exception {

Modified: cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/access.DataContextEJBQLConditionsTest.xml
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/access.DataContextEJBQLConditionsTest.xml?rev=589150&r1=589149&r2=589150&view=diff
==============================================================================
--- cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/access.DataContextEJBQLConditionsTest.xml
(original)
+++ cayenne/main/tags/3.0M2/cayenne/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/access.DataContextEJBQLConditionsTest.xml
Sat Oct 27 09:48:13 2007
@@ -156,6 +156,42 @@
 			</value>
 		</constructor-arg>
 	</bean>
+	
+	<bean id="P12" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.art.Painting</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE)
+				VALUES (33012, 'C', 5000)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+		<bean id="P13" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.art.Painting</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE)
+				VALUES (33013, 'D', 5000)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+		<bean id="P14" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.art.Painting</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE)
+				VALUES (33014, 'C', 5000)
+			</value>
+		</constructor-arg>
+	</bean>
 
 	<!-- ======================================= -->
 	<!-- Data Sets -->
@@ -182,6 +218,16 @@
 				<ref bean="A1" />
 				<ref bean="A2" />
 				<ref bean="A3" />
+			</list>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="prepareInSubquery" class="java.util.ArrayList">
+		<constructor-arg>
+			<list>
+				<ref bean="P12" />
+				<ref bean="P13" />
+				<ref bean="P14" />
 			</list>
 		</constructor-arg>
 	</bean>



Mime
View raw message