cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r653062 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java
Date Sat, 03 May 2008 12:21:36 GMT
Author: aadamchik
Date: Sat May  3 05:21:36 2008
New Revision: 653062

URL: http://svn.apache.org/viewvc?rev=653062&view=rev
Log:
sanity check - on delete the object becomes transient and the context is null

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java?rev=653062&r1=653061&r2=653062&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DeleteObjectTest.java
Sat May  3 05:21:36 2008
@@ -55,6 +55,9 @@
         assertEquals(PersistenceState.COMMITTED, artist.getPersistenceState());
         context.deleteObject(artist);
         assertEquals(PersistenceState.DELETED, artist.getPersistenceState());
+        context.commitChanges();
+        assertEquals(PersistenceState.TRANSIENT, artist.getPersistenceState());
+        assertNull(artist.getObjectContext());
     }
 
     public void testDeleteObjects() throws Exception {



Mime
View raw message