/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
- package com.google.appengine.datanucleus.bugs.jdo;
- import com.google.appengine.datanucleus.bugs.jdo.JDOBugTestCase;
- import com.google.appengine.datanucleus.bugs.test.Issue129Entity;
- public class Issue129Test extends JDOBugTestCase {
- public void testInsert() {
- Issue129Entity entity;
- Issue129LifecycleListener listener = new Issue129LifecycleListener();
- pm.addInstanceLifecycleListener(listener, (Class[])null);
- // makePersistentAll
- entity = new Issue129Entity();
- pm.makePersistentAll(entity);
- assertTrue("PostStore didn't have id set when called for makePersistentAll", listener.idWasSetBeforePostStore());
- // makePersistent
- entity = new Issue129Entity();
- pm.makePersistent(entity);
- assertTrue("PostStore didn't have id set when called for makePersistent", listener.idWasSetBeforePostStore());
- }
- }