PageRenderTime 22ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/tests_bugs/com/google/appengine/datanucleus/bugs/jdo/Issue129Test.java

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