/tests_bugs/com/google/appengine/datanucleus/bugs/jpa/Issue198Test.java
http://datanucleus-appengine.googlecode.com/ · Java · 21 lines · 19 code · 2 blank · 0 comment · 0 complexity · 473a28893fe4dc6b5f7ff24e9f18a4ba MD5 · raw file
- package com.google.appengine.datanucleus.bugs.jpa;
- import com.google.appengine.api.datastore.EntityNotFoundException;
- import com.google.appengine.api.datastore.KeyFactory;
- import com.google.appengine.datanucleus.bugs.test.Foo;
- public class Issue198Test extends JPABugTestCase {
- public void testRun() {
- beginTxn();
- Foo pojo = new Foo();
- em.persist(pojo);
- commitTxn();
- try {
- com.google.appengine.api.datastore.Entity e =
- ds.get(KeyFactory.createKey("BugsJPA$Foo", pojo.getId()));
- assertTrue(e.hasProperty("barKey"));
- } catch (EntityNotFoundException enfe) {
- fail("Entity wasn't found");
- }
- }
- }