/tests_bugs/com/google/appengine/datanucleus/bugs/jdo/Issue129Test.java
Java | 23 lines | 16 code | 5 blank | 2 comment | 0 complexity | f24179877b81fdf50280fa4451be7d1d MD5 | raw file
1package com.google.appengine.datanucleus.bugs.jdo; 2 3import com.google.appengine.datanucleus.bugs.jdo.JDOBugTestCase; 4import com.google.appengine.datanucleus.bugs.test.Issue129Entity; 5 6public class Issue129Test extends JDOBugTestCase { 7 8 public void testInsert() { 9 Issue129Entity entity; 10 Issue129LifecycleListener listener = new Issue129LifecycleListener(); 11 pm.addInstanceLifecycleListener(listener, (Class[])null); 12 13 // makePersistentAll 14 entity = new Issue129Entity(); 15 pm.makePersistentAll(entity); 16 assertTrue("PostStore didn't have id set when called for makePersistentAll", listener.idWasSetBeforePostStore()); 17 18 // makePersistent 19 entity = new Issue129Entity(); 20 pm.makePersistent(entity); 21 assertTrue("PostStore didn't have id set when called for makePersistent", listener.idWasSetBeforePostStore()); 22 } 23}