cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r470207 - /incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/ManyToOneObjectTest.java
Date Thu, 02 Nov 2006 02:52:51 GMT
Author: aadamchik
Date: Wed Nov  1 18:52:51 2006
New Revision: 470207

URL: http://svn.apache.org/viewvc?view=rev&rev=470207
Log:
CAY-682: Generic Cayenne POJO enhancer
(adding test for to-one relationship fault resolving)

Modified:
    incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/ManyToOneObjectTest.java

Modified: incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/ManyToOneObjectTest.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/ManyToOneObjectTest.java?view=diff&rev=470207&r1=470206&r2=470207
==============================================================================
--- incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/ManyToOneObjectTest.java
(original)
+++ incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/ManyToOneObjectTest.java
Wed Nov  1 18:52:51 2006
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.cayenne.itest.pojo;
 
+import java.lang.reflect.Field;
 import java.util.List;
 
 import org.apache.cayenne.query.SelectQuery;
@@ -44,7 +45,13 @@
         assertEquals(1, results.size());
 
         ManyToOneEntity1 o1 = (ManyToOneEntity1) results.get(0);
+
+        Field f = ManyToOneEntity1.class.getDeclaredField("$cay_faultResolved_toOne");
+        assertEquals(Boolean.FALSE, f.get(o1));
+
         OneToManyEntity1 or = o1.getToOne();
         assertNotNull(or);
+
+        assertEquals(Boolean.TRUE, f.get(o1));
     }
 }



Mime
View raw message